← Back to Skills Marketplace
sheetaa

Create Agent With Telegram Group

by Sheeta · GitHub ↗ · v0.1.5
cross-platform ✓ Security Clean
592
Downloads
0
Stars
1
Active Installs
6
Versions
Install in OpenClaw
/install create-agent-with-telegram-group
Description
Create a new OpenClaw agent and bind it to a dedicated Telegram group with workspace ~/claw-<agent-name>. Use when the user asks for one-agent-one-group setu...
README (SKILL.md)

Agent Create + Dedicated Telegram Group

Create one dedicated Telegram group per agent, bind the agent to that group, and set an isolated workspace path.

Script-first Rule

Prefer bundled scripts for deterministic steps (more stable + lower token cost). Only do manual JSON editing when scripts cannot cover a special case.

Use:

  • scripts/provision_config.py for agent/config/binding/no-mention setup (with automatic backup of openclaw.json)
  • scripts/init_workspace.py for USER.md / IDENTITY.md / SOUL.md initialization

Access Scope

This skill accesses the following files on the host:

  • ~/.openclaw/openclaw.json — read (model discovery) and write (agent binding)
  • ~/.openclaw/cron/jobs.json — read-only (for job listing if needed)
  • ~/claw-\x3Cagent-name>/ — workspace directory created by script
  • ~/.openclaw/agents/\x3Cagent-id>/agent/ — directory created (no auth files copied)

Config Safety

  • scripts/provision_config.py reads and writes ~/.openclaw/openclaw.json.
  • By default it creates a backup file: ~/.openclaw/openclaw.json.bak.\x3Ctimestamp>.
  • It updates only:
    • agents.list (add/update target agent) — does NOT copy auth credentials
    • bindings (add target telegram group binding)
    • channels.telegram.groups.\x3Cchat_id>.requireMention=false
    • gateway.reload.mode only if missing (sets default hybrid)
  • The skill does NOT propagate API keys or auth tokens between agents.
  • Gateway-level auth is inherited automatically; do not manually copy auth files.

Inputs

Collect (before executing):

  • agent_name (required)
  • model (required): ask user explicitly which model to use; model options must be read live from the user’s ~/.openclaw/openclaw.json (do not hardcode examples)
  • Optional telegram_group_title override (custom group name)
  • Initialization preferences (required ask):
    • whether to create/update USER.md
    • whether to create/update IDENTITY.md
    • whether to create/update SOUL.md
  • If initialization is enabled, collect content fields before writing files:
    • USER.md: user name / preferred call name / language / goals / notes
    • IDENTITY.md: agent display name / vibe / emoji (optional)
    • SOUL.md: role/mission / tone / constraints (short bullet points)

Normalize agent_name:

  • Keep lowercase letters, digits, and hyphens only.
  • Replace spaces/underscores with -.
  • Use this value in paths and IDs.

Telegram group title rule:

  • If user provides telegram_group_title, use it directly.
  • If not provided, generate default title from agent name in PascalCase.
    • Example: test-skill -> TestSkill, bilingual-agent -> BilingualAgent.

Workflow

  1. Read available models from ~/.openclaw/openclaw.json first, then confirm inputs with user (agent name, model, init-file preferences, optional telegram group title).
  2. Build workspace path as ~/claw-\x3Cagent-name> and create it if missing.
  3. Resolve group title:
    • custom telegram_group_title if provided
    • otherwise PascalCase(agent_name)
  4. Create and bind Telegram group (use resolved group title):
    • use browser automation/user-account flow (Telegram bot API cannot reliably create groups)
    • CONFIRM with user before triggering browser automation (explicit yes/no required)
    • if browser automation is unavailable, request the minimal manual steps and resume
  5. Create/update OpenClaw config via script (preferred):
    • CONFIRM with user before modifying openclaw.json (explicit yes/no required)
    • python3 scripts/provision_config.py --agent-name \x3Cagent_name> --model \x3Cmodel> --chat-id \x3Cchat_id>
    • this sets: agent entry, workspace, binding, and requireMention=false
  6. Apply config and activate it:
    • if hot reload is enabled, verify reload logs show applied changes
    • if reload is off or not applied, CONFIRM with user before restarting gateway (explicit yes/no required)
    • restart gateway only after user approval
  7. Bootstrap agent runtime files (required for first-run stability):
    • ensure ~/.openclaw/agents/\x3Cagent-id>/agent exists
    • do NOT copy any auth files from other agents (this prevents credential/API key propagation)
    • new agents inherit authentication from the gateway's shared auth context automatically
    • do NOT manually copy or create auth-profiles.json, auth.json, or models.json
  8. If initialization is requested, ask user for file content fields first, then write files:
    • collect required values for USER.md / IDENTITY.md / SOUL.md
    • then run: python3 scripts/init_workspace.py --workspace \x3Cworkspace> --agent-name \x3Cagent_name> [--with-user] [--with-identity] [--with-soul]
    • if user provided custom text, apply it after script initialization (overwrite placeholders)
  9. Ensure routing validity for current schema (no invalid allowFrom entries for groups).
  10. Post-provision verification:
  • send a test message in group and ask user to send ping
  • confirm agent responds without @mention
  1. Return completion summary with:
  • agent name
  • model
  • workspace path
  • group title
  • chat_id
  • no-mention reply mode (enabled/disabled)
  • status and next step (if any)

Telegram Automation Rules

  • Group creation/deletion and member operations should use browser automation (user-account flow).
  • For browser flow, prefer Chrome relay profile for existing logged-in Telegram sessions.
  • If no connected Chrome tab is available, ask user to attach once, then continue.
  • If Telegram shows confirmation/captcha that cannot be automated, request one manual click, then resume.

OpenClaw Command Discovery

Do not invent OpenClaw commands.

When agent create/update command syntax is unknown:

  1. Run openclaw help.
  2. If needed, run openclaw \x3Csubcommand> --help for the relevant subcommand.
  3. Use only discovered command forms.

Idempotency

  • If ~/claw-\x3Cagent-name> already exists, reuse it.
  • If a same-name group already exists, confirm whether to reuse or create a fresh one.
  • If agent already exists, update model/binding/workdir instead of duplicating.

Reliability Checks (must do)

  • Verify requireMention=false for the bound group.
  • Verify gateway config actually applied:
    • check reload mode/status logs (config hot reload applied, restarting telegram channel)
    • if reload is off or not applied, restart gateway and re-check logs.
  • Send one bot-originated test message to the new group, then require one live user ping.
  • Verify agent replies without @mention.
  • Do not claim success before ping -> pong verification passes.

Failure Handling

If group creation succeeds but binding fails:

  • Keep created group.
  • Report exact failed step.
  • Provide one-command resume instruction for the next run.

If chat_id cannot be resolved automatically:

  • Report that as a partial success.
  • Provide the shortest fallback step to fetch chat_id, then continue binding.

Output Template

Return concise status:

  • agent: \x3Cagent-name>
  • model: \x3Cselected-model>
  • workspace: ~/claw-\x3Cagent-name>
  • telegram_group: \x3Ctitle>
  • chat_id: \x3Cid or PENDING>
  • binding: \x3Cdone|pending>
  • reply_without_mention: \x3Cenabled|disabled>
  • initialized_files: \x3CUSER.md, IDENTITY.md, SOUL.md or subset>
  • verification: \x3Cpassed|failed>
  • next_step: \x3Cnone or exact minimal action>
Usage Guidance
This skill appears coherent and limited in scope, but take these precautions before running it: 1) Review ~/.openclaw/openclaw.json and the generated backup after the script runs; 2) Confirm any browser automation step before allowing it (the skill requires explicit confirmation); browser automation can access your logged-in Telegram session/profile, so only proceed if you understand that action; 3) Verify the chat_id and group title you provide to avoid binding the wrong group; 4) Inspect the included scripts locally (they validate paths to your home and avoid copying auth files) and run them manually if you prefer full control; 5) If you're uncomfortable with automated gateway restarts, refuse that step and perform the restart manually after inspection.
Capability Analysis
Type: OpenClaw Skill Name: create-agent-with-telegram-group Version: 0.1.5 The skill bundle is benign. The `SKILL.md` explicitly instructs the AI agent to require user confirmation before performing high-privilege actions (modifying `openclaw.json`, browser automation, restarting gateway) and forbids copying authentication files or inventing commands. The Python scripts (`scripts/init_workspace.py`, `scripts/provision_config.py`) implement robust path validation (`validate_path_within`) to prevent arbitrary file writes and path traversal, ensuring all operations are confined to the user's home directory. User inputs are sanitized (`norm_agent_id`) or safely embedded as string values in JSON, with no evidence of malicious execution, data exfiltration, or persistence mechanisms.
Capability Assessment
Purpose & Capability
The skill's name/description (create an OpenClaw agent and bind it to a Telegram group) matches what the included scripts do: create a workspace, update ~/.openclaw/openclaw.json, and add bindings. No unrelated binaries, cloud creds, or external services are requested.
Instruction Scope
Runtime instructions explicitly require reading and writing ~/.openclaw/openclaw.json and creating files under ~/claw-<agent-name> — which the scripts perform. The SKILL.md also calls for browser automation (user-account flow) to create Telegram groups; the provided scripts do not perform browser automation, so that step relies on user action or an external automation tool. SKILL.md mentions reading ~/.openclaw/cron/jobs.json in Access Scope, but the scripts do not touch that file — a minor documentation mismatch but not dangerous. The skill repeatedly requires explicit user confirmation before high-privilege actions (modifying config, triggering automation, restarting gateway), which reduces risk.
Install Mechanism
No install spec or external downloads. It's instruction-first with two small Python scripts included. Nothing is fetched from external URLs or installed to system directories.
Credentials
No environment variables, credentials, or config paths outside the user's home are requested. The scripts validate that config and workspace paths are within the user's home to prevent arbitrary writes. The skill documents that it will not copy auth files between agents.
Persistence & Privilege
The skill writes to the user's ~/.openclaw/openclaw.json and creates a backup by default; this is expected for a provisioning tool and is limited to the user's home. always:true is not set, and the skill does not modify other skills' configs or system-wide settings beyond the OpenClaw config file under ~/.openclaw.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install create-agent-with-telegram-group
  3. After installation, invoke the skill by name or use /create-agent-with-telegram-group
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.5
Add explicit user-approval gates for high-privilege actions: browser automation, openclaw.json modification, and gateway restart must each be confirmed before execution.
v0.1.4
Security hardening: add path validation in bundled scripts to prevent arbitrary file write attacks. Both provision_config.py and init_workspace.py now enforce that all file operations stay within the user's home directory.
v0.1.3
Resolve credential handling contradiction: explicitly remove all guidance about copying auth files between agents, add Access Scope section declaring exact file read/write targets, and clarify that new agents inherit auth from gateway context automatically.
v0.1.2
Security hardening: remove credential/API key propagation by not copying auth.json/models.json between agents, clarify gateway-level auth inheritance, and simplify model discovery to reduce prompt injection surface.
v0.1.1
Fix safety and portability issues: remove hardcoded /Users/yao paths, default to user home, add automatic openclaw.json backup, replace surprising USER.md defaults with neutral placeholders, clarify browser-based Telegram group flow, and document exact openclaw.json fields modified.
v0.1.0
Create and bind a dedicated Telegram group per agent with isolated workspace provisioning; asks for model and init-file preferences, supports custom/default group naming, and enforces no-mention reply setup.
Metadata
Slug create-agent-with-telegram-group
Version 0.1.5
License
All-time Installs 1
Active Installs 1
Total Versions 6
Frequently Asked Questions

What is Create Agent With Telegram Group?

Create a new OpenClaw agent and bind it to a dedicated Telegram group with workspace ~/claw-<agent-name>. Use when the user asks for one-agent-one-group setu... It is an AI Agent Skill for Claude Code / OpenClaw, with 592 downloads so far.

How do I install Create Agent With Telegram Group?

Run "/install create-agent-with-telegram-group" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Create Agent With Telegram Group free?

Yes, Create Agent With Telegram Group is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Create Agent With Telegram Group support?

Create Agent With Telegram Group is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Create Agent With Telegram Group?

It is built and maintained by Sheeta (@sheetaa); the current version is v0.1.5.

💬 Comments