agentleFS
kronus-techkronus-tech/kronus/.claude/skills/telegram-project/SKILL.md

telegram-project

Skill4 starsChanged 7 months agoMITView on GitHub

Manage Telegram group → project directory mappings for the kronus daemon. Use when the user wants to map a Telegram group to a project, list mappings, or configure project settings.

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read ~/.claude/channels/telegram/projects.json (handle missing file).

    line 53
  2. Very specific:

    Read projects.json (create default if missing).

    line 58
  3. Very specific:

    Default --path to current working directory (run pwd).

    line 59
  4. Very specific:

    Default --name to basename of the path.

    line 60
  5. Very specific:

    Default --mode to "acceptEdits".

    line 61
  6. Very specific:

    Check if group exists in ~/.claude/channels/telegram/access.json groups.

    line 65
  7. Very specific:

    Read, delete projects[<group_id>], write.

    line 70
  8. Distinctive:

    Update the key, write back.

    line 78
  9. Very specific:

    Run pwd to get current directory.

    line 83
  10. Very specific:

    If group_id provided as additional arg: proceed like add <group_id> --path <cwd>.

    line 86
  11. Distinctive:

    Always Read the file before Write — don't clobber.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Telegram Project Mapping

Manages project-to-group mappings in ~/.claude/channels/telegram/projects.json. The kronus daemon reads this file to route Telegram group messages to the correct Claude Code session.

Arguments passed: $ARGUMENTS


State shape

~/.claude/channels/telegram/projects.json:

{
  "projects": {
    "<group_id>": {
      "name": "project-name",
      "path": "/absolute/path/to/project",
      "allowedTools": ["Read", "Write", "Edit", "Glob", "Grep", "Bash"],
      "permissionMode": "acceptEdits",
      "addedAt": "2026-03-22T00:00:00Z"
    }
  },
  "defaults": {
    "allowedTools": ["Read", "Glob", "Grep"],
    "permissionMode": "default"
  }
}

Missing file = create with empty projects and safe defaults.


Dispatch on arguments

Parse $ARGUMENTS (space-separated). If empty or unrecognized, show status.

No args — status

  1. Read ~/.claude/channels/telegram/projects.json (handle missing file).
  2. Show: number of mapped projects, each with name, path, group_id, permissionMode.

add <group_id> (optional: --name <name>, --path <path>, --mode <permissionMode>)

  1. Read projects.json (create default if missing).
  2. Default --path to current working directory (run pwd).
  3. Default --name to basename of the path.
  4. Default --mode to "acceptEdits".
  5. Default allowedTools to ["Read", "Write", "Edit", "Glob", "Grep", "Bash"].
  6. Set projects[<group_id>] with the config and current ISO timestamp.
  7. Write back.
  8. Check if group exists in ~/.claude/channels/telegram/access.json groups. If not, warn user to run /telegram:access group add <group_id>.
  9. Confirm the mapping.

rm <group_id>

  1. Read, delete projects[<group_id>], write.
  2. Confirm.

set <group_id> <key> <value>

  1. Read projects.json.
  2. Validate group_id exists.
  3. Supported keys: name, path, permissionMode, allowedTools (JSON array string).
  4. Update the key, write back.
  5. Confirm.

init

  1. Run pwd to get current directory.
  2. Read projects.json.
  3. Tell user: "To map this project, provide the Telegram group ID. You can find it by adding @raw_data_bot to your group."
  4. If group_id provided as additional arg: proceed like add <group_id> --path <cwd>.

Implementation notes

  • Always Read the file before Write — don't clobber.
  • Pretty-print JSON (2-space indent).
  • Group IDs are negative numbers (e.g., -1001234567890) — store as strings.
  • Validate paths exist before saving (run ls on the path).
  • The daemon re-reads this file on each incoming message, so changes take effect immediately.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.