Skip to content

feat: auto-discover Claude Code skills as Telegram bot commands#68

Open
zhou-zhichao wants to merge 1 commit intosix-ddc:mainfrom
zhou-zhichao:feat/dynamic-skill-commands
Open

feat: auto-discover Claude Code skills as Telegram bot commands#68
zhou-zhichao wants to merge 1 commit intosix-ddc:mainfrom
zhou-zhichao:feat/dynamic-skill-commands

Conversation

@zhou-zhichao
Copy link
Copy Markdown

Summary

  • Scan ~/.claude/skills/ recursively on startup to discover installed Claude Code skills
  • Register them as Telegram bot commands so users see all available slash commands (like /commit, /review, /ship) in the "/" menu
  • Convert hyphen-case skill names to underscores for Telegram compatibility (agent-browseragent_browser), convert back when forwarding to Claude Code

Details

  • New claude_skills_path config (auto-detected from ~/.claude/skills/ or via CCBOT_CLAUDE_SKILLS_PATH env var)
  • Recursively walks skill directories to find bundled skill packs (e.g. gstack/review/SKILL.md)
  • Parses YAML frontmatter from each SKILL.md for name and description fields
  • Skips skills that collide with built-in bot commands
  • Respects Telegram's 100 command and 256-char description limits
  • Codex review: PASS (0 findings after addressing initial P1/P2 feedback)

Test plan

  • Install skills in ~/.claude/skills/ and verify they appear in Telegram "/" menu
  • Verify hyphenated skill names work (e.g. /agent_browser forwards as /agent-browser)
  • Verify built-in commands (/history, /screenshot, etc.) still work
  • Verify nested skill packs (e.g. gstack/) are discovered
  • Test with no skills directory → graceful no-op
  • Test with >100 skills → truncation warning in logs

Scan ~/.claude/skills/ on startup and register discovered skills as
Telegram bot commands, so users see all available slash commands
(like /commit, /review, /ship) in the "/" menu — matching what Claude
Code shows locally.

- Add claude_skills_path config (auto-detected or via CCBOT_CLAUDE_SKILLS_PATH)
- Recursively walk skill directories to find bundled skill packs (e.g. gstack/)
- Parse YAML frontmatter from each SKILL.md for name + description
- Convert hyphen-case skill names to underscores for Telegram compatibility
  (agent-browser -> agent_browser), convert back when forwarding to Claude Code
- Skip skills that collide with built-in bot commands
- Respect Telegram's 100 command limit with truncation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant