{"owner":"HKUDS","repo":"nanobot","hasSkills":true,"totalSkillsCount":11,"totalTokensCount":9202,"categories":["anthropic-skill"],"hasMcp":false,"mcpConfig":null,"found":["nanobot/skills/cron/SKILL.md","nanobot/skills/summarize/SKILL.md","nanobot/skills/clawhub/SKILL.md","nanobot/skills/my/SKILL.md","nanobot/skills/github/SKILL.md","nanobot/skills/memory/SKILL.md","nanobot/skills/skill-creator/SKILL.md","nanobot/skills/weather/SKILL.md","nanobot/skills/README.md","nanobot/skills/my/references/examples.md","nanobot/skills/tmux/SKILL.md"],"skills":{"nanobot/skills/cron/SKILL.md":"---\nname: cron\ndescription: Schedule reminders and recurring tasks.\n---\n\n# Cron\n\nUse the `cron` tool to schedule reminders or recurring tasks. New tasks run in the current chat. nanobot sends the agent's final reply to that chat. The user can change the task's chat in WebUI.\n\nWrite what to do in `message`. For a normal reminder or report, do not copy the current channel, chat ID, or instructions to call the `message` tool into the task. For example, use \"Remind me to drink water\", not \"Call message to send to this chat\".\n\nIf the user asks to send to other chats, preserve those recipients in the task instructions. Use the `message` tool for those sends and for file attachments. Existing tasks that explicitly request a `message` call still use it; changing the task's chat does not change explicit recipients in its instructions.\n\nChoose by timing and notification behavior, not repetition. A specified time or interval uses `cron`, even when it repeats: \"every day at 8am, remind me to drink water\" is a cron task. Use `HEARTBEAT.md` for background checks with flexible timing that should notify only on actionable changes. Heartbeat does not guarantee a requested time or interval; do not substitute it for an explicit schedule.\n\n## Task Types\n\n1. **Reminder** - the agent replies with the reminder when the task runs\n2. **Task** - the agent follows the instructions and replies with the result\n3. **One-time** - runs once at a specific time, then auto-deletes\n\n## Examples\n\nFixed reminder:\n```\ncron(action=\"add\", message=\"Time to take a break!\", every_seconds=1200)\n```\n\nDynamic task (agent executes each time):\n```\ncron(action=\"add\", message=\"Check HKUDS/nanobot GitHub stars and report\", every_seconds=600)\n```\n\nOne-time scheduled task (compute ISO datetime from current time):\n```\ncron(action=\"add\", message=\"Remind me about the meeting\", at=\"<ISO datetime>\")\n```\n\nTimezone-aware cron:\n```\ncron(action=\"add\", message=\"Morning standup\", cron_expr=\"0 9 * * 1-5\", tz=\"America/Vancouver\")\n```\n\nList/remove:\n```\ncron(action=\"list\")\ncron(action=\"remove\", job_id=\"abc123\")\n```\n\n## Time Expressions\n\n| User says | Parameters |\n|-----------|------------|\n| every 20 minutes | every_seconds: 1200 |\n| every hour | every_seconds: 3600 |\n| every day at 8am | cron_expr: \"0 8 * * *\" |\n| weekdays at 5pm | cron_expr: \"0 17 * * 1-5\" |\n| 9am Vancouver time daily | cron_expr: \"0 9 * * *\", tz: \"America/Vancouver\" |\n| at a specific time | at: ISO datetime string (compute from current time) |\n\n## Timezone\n\nUse `tz` with `cron_expr` to schedule in a specific IANA timezone. Without `tz`, the server's local timezone is used.\n","nanobot/skills/summarize/SKILL.md":"---\nname: summarize\ndescription: Summarize or extract text and transcripts from URLs, YouTube videos, podcasts, and local files.\nhomepage: https://summarize.sh\nmetadata: {\"nanobot\":{\"emoji\":\"🧾\",\"requires\":{\"bins\":[\"summarize\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"steipete/tap/summarize\",\"bins\":[\"summarize\"],\"label\":\"Install summarize (brew)\"}]}}\n---\n\n# Summarize\n\nFast CLI to summarize URLs, local files, and YouTube links.\n\n## When to use (trigger phrases)\n\nUse this skill immediately when the user asks any of:\n- “use summarize.sh”\n- “what’s this link/video about?”\n- “summarize this URL/article”\n- “transcribe this YouTube/video” (best-effort transcript extraction; no `yt-dlp` needed)\n\n## Quick start\n\n```bash\nsummarize \"https://example.com\" --model google/gemini-3-flash-preview\nsummarize \"/path/to/file.pdf\" --model google/gemini-3-flash-preview\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto\n```\n\n## YouTube: summary vs transcript\n\nBest-effort transcript (URLs only):\n\n```bash\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto --extract-only\n```\n\nIf the user asked for a transcript but it’s huge, return a tight summary first, then ask which section/time range to expand.\n\n## Model + keys\n\nSet the API key for your chosen provider:\n- OpenAI: `OPENAI_API_KEY`\n- Anthropic: `ANTHROPIC_API_KEY`\n- xAI: `XAI_API_KEY`\n- Google: `GEMINI_API_KEY` (aliases: `GOOGLE_GENERATIVE_AI_API_KEY`, `GOOGLE_API_KEY`)\n\nDefault model is `google/gemini-3-flash-preview` if none is set.\n\n## Useful flags\n\n- `--length short|medium|long|xl|xxl|<chars>`\n- `--max-output-tokens <count>`\n- `--extract-only` (URLs only)\n- `--json` (machine readable)\n- `--firecrawl auto|off|always` (fallback extraction)\n- `--youtube auto` (Apify fallback if `APIFY_API_TOKEN` set)\n\n## Config\n\nOptional config file: `~/.summarize/config.json`\n\n```json\n{ \"model\": \"openai/gpt-5.2\" }\n```\n\nOptional services:\n- `FIRECRAWL_API_KEY` for blocked sites\n- `APIFY_API_TOKEN` for YouTube fallback\n","nanobot/skills/clawhub/SKILL.md":"---\nname: clawhub\ndescription: Search and install agent skills from ClawHub, the public skill registry.\nhomepage: https://clawhub.ai\nmetadata: {\"nanobot\":{\"emoji\":\"🦞\"}}\n---\n\n# ClawHub\n\nPublic skill registry for AI agents. Search by natural language (vector search).\n\n## When to use\n\nUse this skill when the user asks any of:\n- \"find a skill for …\"\n- \"search for skills\"\n- \"install a skill\"\n- \"what skills are available?\"\n- \"update my skills\"\n\n## Search\n\n```bash\nnpx --yes clawhub@latest search \"web scraping\" --limit 5\n```\n\n## Install\n\n```bash\nnpx --yes clawhub@latest install <slug> --workdir ~/.nanobot/workspace\n```\n\nReplace `<slug>` with the skill name from search results. This places the skill into `~/.nanobot/workspace/skills/`, where nanobot loads workspace skills from. Always include `--workdir`.\n\n## Update\n\n```bash\nnpx --yes clawhub@latest update --all --workdir ~/.nanobot/workspace\n```\n\n## List installed\n\n```bash\nnpx --yes clawhub@latest list --workdir ~/.nanobot/workspace\n```\n\n## Notes\n\n- Requires Node.js (`npx` comes with it).\n- No API key needed for search and install.\n- Login (`npx --yes clawhub@latest login`) is only required for publishing.\n- `--workdir ~/.nanobot/workspace` is critical — without it, skills install to the current directory instead of the nanobot workspace.\n- After install, remind the user to start a new session to load the skill.\n","nanobot/skills/my/SKILL.md":"---\nname: my\ndescription: Inspect or troubleshoot the agent's runtime state, adjust runtime settings, or keep temporary session notes.\n---\n\n# Self-Awareness\n\n## How to use\n\n1. **Identify the situation** from the categories below\n2. **Call the my tool** with the appropriate action\n3. **If set**, warn the user before changing impactful settings such as the model or runtime limits\n4. **For detailed examples**, read [references/examples.md](references/examples.md)\n\n## When to check\n\n<rule>\n**Diagnose before explaining.** When something doesn't work, check your state first.\n</rule>\n\n<rule>\n**Check budget before complex tasks.** Know your limits before committing.\n</rule>\n\n<rule>\n**Recall across turns.** Store preferences in your scratchpad, read them back later.\n</rule>\n\n## When to set\n\n<rule>\n**Only set when benefit is clear and user is informed.** Warn before changing model.\n</rule>\n\n| Situation | Command |\n|-----------|---------|\n| Check capacity for a large task | `my(action=\"check\", key=\"context_window_tokens\")` |\n| Switch model or context capacity | `my(action=\"set\", key=\"model_preset\", value=\"<preset-name>\")` |\n| Long multi-step task | `my(action=\"set\", key=\"max_iterations\", value=80)` |\n\n**Tradeoff:** Bias toward stability. Only set when defaults are genuinely insufficient.\n\n## Anti-patterns\n\n<rule>\n**Don't check every turn.** Costs a tool call. Use when you need information, not reflexively.\n</rule>\n\n<rule>\n**Don't store sensitive data.** No API keys, passwords, or tokens in scratchpad.\n</rule>\n\n<rule>\n**Don't set workspace.** Does not update file tool boundaries — won't work.\n</rule>\n\n## Constraints\n\n- `model_preset` is saved for the current session; other modifications are in-memory only\n- Direct `model` and `context_window_tokens` writes are rejected during active sessions because they would change the shared instance default. Use a configured `model_preset` instead.\n- Protected params have type/range validation: `max_iterations` (1–100), `context_window_tokens` (4096–1M), `model` (non-empty str)\n- If `tools.my.allow_set` is false, check only\n\n## Related tools\n\n| Need | Use | Persists? |\n|------|-----|-----------|\n| Per-session temp state | `my(action=\"set\", key=\"...\", value=...)` | No |\n| Long-term facts | Memory skill (`MEMORY.md`, `USER.md`) | Yes |\n| Permanent config change | Edit config file | Yes |\n\n**Rule of thumb:** Tomorrow? Memory. This turn only? My.\n","nanobot/skills/github/SKILL.md":"---\nname: github\ndescription: \"Manage GitHub issues and pull requests, inspect CI runs, and query repository data.\"\nmetadata: {\"nanobot\":{\"emoji\":\"🐙\",\"requires\":{\"bins\":[\"gh\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (brew)\"},{\"id\":\"apt\",\"kind\":\"apt\",\"package\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (apt)\"}]}}\n---\n\n# GitHub Skill\n\nUse the `gh` CLI to interact with GitHub. Always specify `--repo owner/repo` when not in a git directory, or use URLs directly.\n\n## Pull Requests\n\nCheck CI status on a PR:\n```bash\ngh pr checks 55 --repo owner/repo\n```\n\nList recent workflow runs:\n```bash\ngh run list --repo owner/repo --limit 10\n```\n\nView a run and see which steps failed:\n```bash\ngh run view <run-id> --repo owner/repo\n```\n\nView logs for failed steps only:\n```bash\ngh run view <run-id> --repo owner/repo --log-failed\n```\n\n## API for Advanced Queries\n\nThe `gh api` command is useful for accessing data not available through other subcommands.\n\nGet PR with specific fields:\n```bash\ngh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'\n```\n\n## JSON Output\n\nMost commands support `--json` for structured output.  You can use `--jq` to filter:\n\n```bash\ngh issue list --repo owner/repo --json number,title --jq '.[] | \"\\(.number): \\(.title)\"'\n```\n","nanobot/skills/memory/SKILL.md":"---\nname: memory\ndescription: Search past conversations in the agent's history log.\n---\n\n# Memory\n\n## Search Past Events\n\nSearch the exact `History log` path from the system prompt using an available text-search\ntool. This path belongs to the agent workspace, which can differ from the current project.\n\nThe append-only JSONL log stores `cursor`, `timestamp`, and `content` per entry. Retrieve\nentries on demand by topic or date, and inspect neighboring entries when context matters.\n","nanobot/skills/skill-creator/SKILL.md":"---\nname: skill-creator\ndescription: Create, update, or package agent skills.\n---\n\n# Skill Creator\n\nThis skill provides guidance for creating effective skills.\n\n## About Skills\n\nSkills are modular, self-contained packages that extend the agent's capabilities by providing\nspecialized knowledge, workflows, and tools. Think of them as \"onboarding guides\" for specific\ndomains or tasks—they transform the agent from a general-purpose agent into a specialized agent\nequipped with procedural knowledge that no model can fully possess.\n\n### What Skills Provide\n\n1. Specialized workflows - Multi-step procedures for specific domains\n2. Tool integrations - Instructions for working with specific file formats or APIs\n3. Domain expertise - Company-specific knowledge, schemas, business logic\n4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks\n\n## Core Principles\n\n### Concise is Key\n\nThe context window is a public good. Skills share the context window with everything else the agent needs: system prompt, conversation history, other Skills' metadata, and the actual user request.\n\n**Default assumption: the agent is already very smart.** Only add context the agent doesn't already have. Challenge each piece of information: \"Does the agent really need this explanation?\" and \"Does this paragraph justify its token cost?\"\n\nPrefer concise examples over verbose explanations.\n\n### Set Appropriate Degrees of Freedom\n\nMatch the level of specificity to the task's fragility and variability:\n\n**High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.\n\n**Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.\n\n**Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.\n\nThink of the agent as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).\n\n### Anatomy of a Skill\n\nEvery skill consists of a required SKILL.md file and optional bundled resources:\n\n```\nskill-name/\n├── SKILL.md (required)\n│   ├── YAML frontmatter metadata (required)\n│   │   ├── name: (required)\n│   │   └── description: (required)\n│   └── Markdown instructions (required)\n└── Bundled Resources (optional)\n    ├── scripts/          - Executable code (Python/Bash/etc.)\n    ├── references/       - Documentation intended to be loaded into context as needed\n    └── assets/           - Files used in output (templates, icons, fonts, etc.)\n```\n\n#### SKILL.md (required)\n\nEvery SKILL.md consists of:\n\n- **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that the agent reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.\n- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).\n\n#### Bundled Resources (optional)\n\n##### Scripts (`scripts/`)\n\nExecutable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.\n\n- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed\n- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks\n- **Benefits**: Token efficient, deterministic, may be executed without loading into context\n- **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments\n\n##### References (`references/`)\n\nDocumentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking.\n\n- **When to include**: For documentation that the agent should reference while working\n- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications\n- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides\n- **Benefits**: Keeps SKILL.md lean, loaded only when the agent determines it's needed\n- **Best practice**: If files are large (>10k words), include grep patterns in SKILL.md so the agent can use built-in search tools efficiently; mention when the default `grep(output_mode=\"files_with_matches\")`, `grep(output_mode=\"count\")`, `grep(fixed_strings=true)`, or pagination via `head_limit` / `offset` is the right first step\n- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.\n\n##### Assets (`assets/`)\n\nFiles not intended to be loaded into context, but rather used within the output the agent produces.\n\n- **When to include**: When the skill needs files that will be used in the final output\n- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography\n- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified\n- **Benefits**: Separates output resources from documentation, enables the agent to use files without loading them into context\n\n#### What to Not Include in a Skill\n\nA skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:\n\n- README.md\n- INSTALLATION_GUIDE.md\n- QUICK_REFERENCE.md\n- CHANGELOG.md\n- etc.\n\nThe skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.\n\n### Progressive Disclosure Design Principle\n\nSkills use a three-level loading system to manage context efficiently:\n\n1. **Metadata (name + description)** - Always in context (~100 words)\n2. **SKILL.md body** - When skill triggers (<5k words)\n3. **Bundled resources** - As needed by the agent (Unlimited because scripts can be executed without reading into context window)\n\n#### Progressive Disclosure Patterns\n\nKeep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.\n\n**Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.\n\n**Pattern 1: High-level guide with references**\n\n```markdown\n# PDF Processing\n\n## Quick start\n\nExtract text with pdfplumber:\n[code example]\n\n## Advanced features\n\n- **Form filling**: See [FORMS.md](FORMS.md) for complete guide\n- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods\n- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns\n```\n\nthe agent loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.\n\n**Pattern 2: Domain-specific organization**\n\nFor Skills with multiple domains, organize content by domain to avoid loading irrelevant context:\n\n```\nbigquery-skill/\n├── SKILL.md (overview and navigation)\n└── reference/\n    ├── finance.md (revenue, billing metrics)\n    ├── sales.md (opportunities, pipeline)\n    ├── product.md (API usage, features)\n    └── marketing.md (campaigns, attribution)\n```\n\nWhen a user asks about sales metrics, the agent only reads sales.md.\n\nSimilarly, for skills supporting multiple frameworks or variants, organize by variant:\n\n```\ncloud-deploy/\n├── SKILL.md (workflow + provider selection)\n└── references/\n    ├── aws.md (AWS deployment patterns)\n    ├── gcp.md (GCP deployment patterns)\n    └── azure.md (Azure deployment patterns)\n```\n\nWhen the user chooses AWS, the agent only reads aws.md.\n\n**Pattern 3: Conditional details**\n\nShow basic content, link to advanced content:\n\n```markdown\n# DOCX Processing\n\n## Creating documents\n\nUse docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).\n\n## Editing documents\n\nFor simple edits, modify the XML directly.\n\n**For tracked changes**: See [REDLINING.md](REDLINING.md)\n**For OOXML details**: See [OOXML.md](OOXML.md)\n```\n\nthe agent reads REDLINING.md or OOXML.md only when the user needs those features.\n\n**Important guidelines:**\n\n- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.\n- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so the agent can see the full scope when previewing.\n\n## Skill Creation Process\n\nSkill creation involves these steps:\n\n1. Understand the skill with concrete examples\n2. Plan reusable skill contents (scripts, references, assets)\n3. Initialize the skill (run init_skill.py)\n4. Edit the skill (implement resources and write SKILL.md)\n5. Package the skill (run package_skill.py)\n6. Iterate based on real usage\n\nFollow these steps in order, skipping only if there is a clear reason why they are not applicable.\n\n### Skill Naming\n\n- Use lowercase letters, digits, and hyphens only; normalize user-provided titles to hyphen-case (e.g., \"Plan Mode\" -> `plan-mode`).\n- When generating names, generate a name under 64 characters (letters, digits, hyphens).\n- Prefer short, verb-led phrases that describe the action.\n- Namespace by tool when it improves clarity or triggering (e.g., `gh-address-comments`, `linear-address-issue`).\n- Name the skill folder exactly after the skill name.\n\n### Step 1: Understanding the Skill with Concrete Examples\n\nSkip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.\n\nTo create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.\n\nFor example, when building an image-editor skill, relevant questions include:\n\n- \"What functionality should the image-editor skill support? Editing, rotating, anything else?\"\n- \"Can you give some examples of how this skill would be used?\"\n- \"I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?\"\n- \"What would a user say that should trigger this skill?\"\n\nTo avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.\n\nConclude this step when there is a clear sense of the functionality the skill should support.\n\n### Step 2: Planning the Reusable Skill Contents\n\nTo turn concrete examples into an effective skill, analyze each example by:\n\n1. Considering how to execute on the example from scratch\n2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly\n\nExample: When building a `pdf-editor` skill to handle queries like \"Help me rotate this PDF,\" the analysis shows:\n\n1. Rotating a PDF requires re-writing the same code each time\n2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill\n\nExample: When designing a `frontend-webapp-builder` skill for queries like \"Build me a todo app\" or \"Build me a dashboard to track my steps,\" the analysis shows:\n\n1. Writing a frontend webapp requires the same boilerplate HTML/React each time\n2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill\n\nExample: When building a `big-query` skill to handle queries like \"How many users have logged in today?\" the analysis shows:\n\n1. Querying BigQuery requires re-discovering the table schemas and relationships each time\n2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill\n\nTo establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.\n\n### Step 3: Initializing the Skill\n\nAt this point, it is time to actually create the skill.\n\nSkip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.\n\nWhen creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.\n\nFor `nanobot`, custom skills should live under the active workspace `skills/` directory so they can be discovered automatically at runtime (for example, `<workspace>/skills/my-skill/SKILL.md`).\n\nUsage:\n\n```bash\nscripts/init_skill.py <skill-name> --path <output-directory> [--resources scripts,references,assets] [--examples]\n```\n\nExamples:\n\n```bash\nscripts/init_skill.py my-skill --path ./workspace/skills\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts,references\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts --examples\n```\n\nThe script:\n\n- Creates the skill directory at the specified path\n- Generates a SKILL.md template with proper frontmatter and TODO placeholders\n- Optionally creates resource directories based on `--resources`\n- Optionally adds example files when `--examples` is set\n\nAfter initialization, customize the SKILL.md and add resources as needed. If you used `--examples`, replace or delete placeholder files.\n\n### Step 4: Edit the Skill\n\nWhen editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of the agent to use. Include information that would be beneficial and non-obvious to the agent. Consider what procedural knowledge, domain-specific details, or reusable assets would help another agent instance execute these tasks more effectively.\n\n#### Learn Proven Design Patterns\n\nConsult these helpful guides based on your skill's needs:\n\n- **Multi-step processes**: See references/workflows.md for sequential workflows and conditional logic\n- **Specific output formats or quality standards**: See references/output-patterns.md for template and example patterns\n\nThese files contain established best practices for effective skill design.\n\n#### Start with Reusable Skill Contents\n\nTo begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.\n\nAdded scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.\n\nIf you used `--examples`, delete any placeholder files that are not needed for the skill. Only create resource directories that are actually required.\n\n#### Update SKILL.md\n\n**Writing Guidelines:** Always use imperative/infinitive form.\n\n##### Frontmatter\n\nWrite the YAML frontmatter with `name` and `description`:\n\n- `name`: The skill name\n- `description`: This is the primary triggering mechanism for your skill, and helps the agent understand when to use the skill.\n  - Include both what the Skill does and specific triggers/contexts for when to use it.\n  - Include all \"when to use\" information here - Not in the body. The body is only loaded after triggering, so \"When to Use This Skill\" sections in the body are not helpful to the agent.\n  - Example description for a `docx` skill: \"Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when the agent needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks\"\n\nKeep frontmatter minimal. In `nanobot`, `metadata` and `always` are also supported when needed, but avoid adding extra fields unless they are actually required.\n\n##### Body\n\nWrite instructions for using the skill and its bundled resources.\n\n### Step 5: Packaging a Skill\n\nOnce development of the skill is complete, it must be packaged into a distributable .skill file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder>\n```\n\nOptional output directory specification:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder> ./dist\n```\n\nThe packaging script will:\n\n1. **Validate** the skill automatically, checking:\n   - YAML frontmatter format and required fields\n   - Skill naming conventions and directory structure\n   - Description completeness and quality\n   - File organization and resource references\n\n2. **Package** the skill if validation passes, creating a .skill file named after the skill (e.g., `my-skill.skill`) that includes all files and maintains the proper directory structure for distribution. The .skill file is a zip file with a .skill extension.\n\n   Security restriction: symlinks are rejected and packaging fails when any symlink is present.\n\nIf validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.\n\n### Step 6: Iterate\n\nAfter testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.\n\n**Iteration workflow:**\n\n1. Use the skill on real tasks\n2. Notice struggles or inefficiencies\n3. Identify how SKILL.md or bundled resources should be updated\n4. Implement changes and test again\n","nanobot/skills/weather/SKILL.md":"---\nname: weather\ndescription: Get current weather and forecasts.\nhomepage: https://wttr.in/:help\nmetadata: {\"nanobot\":{\"emoji\":\"🌤️\",\"requires\":{\"bins\":[\"curl\"]}}}\n---\n\n# Weather\n\nTwo free services, no API keys needed.\n\n## wttr.in (primary)\n\nChoose one request that matches the user's scope. Do not fetch current\nconditions separately when a today or forecast request already includes them.\n\nPlatform notes:\n- On Windows PowerShell, use `curl.exe`; bare `curl` may resolve to\n  `Invoke-WebRequest`.\n- On macOS and Linux, use `curl`.\n\nCurrent conditions only:\n```bash\ncurl -s \"https://wttr.in/London?format=3\"\n# Output: London: ⛅️ +8°C\n```\n\nCustom current conditions format:\n```bash\ncurl -s \"https://wttr.in/London?format=%l:+%c+%t+%h+%w\"\n# Output: London: ⛅️ +8°C 71% ↙5km/h\n```\n\nToday's weather, including current conditions (use this single request for\nquestions about today's weather):\n```bash\ncurl -s \"https://wttr.in/London?1&m\"\n```\n\nFull forecast:\n```bash\ncurl -s \"https://wttr.in/London?T&m\"\n```\n\nOn Windows PowerShell, replace `curl` with `curl.exe` in the commands above.\n\nFormat codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon\n\nTips:\n- URL-encode spaces: `wttr.in/New+York`\n- Airport codes: `wttr.in/JFK`\n- Units: `?m` (metric) `?u` (USCS)\n- Today only: `?1` · Current only: `?0`\n- PNG (macOS/Linux): `curl -s \"https://wttr.in/Berlin.png\" -o weather.png`\n- PNG (Windows PowerShell): `curl.exe -s \"https://wttr.in/Berlin.png\" -o weather.png`\n\n## Open-Meteo (fallback, JSON)\n\nFree, no key, good for programmatic use:\n```bash\ncurl -s \"https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true\"\n```\n\nFind coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.\n\nDocs: https://open-meteo.com/en/docs\n","nanobot/skills/README.md":"# nanobot Skills\n\nThis directory contains built-in skills that extend nanobot's capabilities.\n\n## Skill Format\n\nEach skill is a directory containing a `SKILL.md` file with:\n- YAML frontmatter (name, description, metadata)\n- Markdown instructions for the agent\n\nWhen skills reference large local documentation or logs, prefer nanobot's built-in `grep` tool to narrow the search space before loading full files. Use `grep(output_mode=\"count\")` / `files_with_matches` for broad searches first, use `head_limit` / `offset` to page through large result sets, and `grep(glob=\"*.md\")` to filter by file name pattern.\n\n## Attribution\n\nThese skills are adapted from [OpenClaw](https://github.com/openclaw/openclaw)'s skill system. The skill format and metadata structure follow OpenClaw's conventions to maintain compatibility.\n\n## Available Skills\n\n| Skill | Description |\n|-------|-------------|\n| `github` | Interact with GitHub using the `gh` CLI |\n| `weather` | Get weather info using wttr.in and Open-Meteo |\n| `summarize` | Summarize URLs, files, and YouTube videos |\n| `tmux` | Remote-control tmux sessions |\n| `clawhub` | Search and install skills from ClawHub registry |\n| `skill-creator` | Create new skills |\n| `nanobot-document` | Explain nanobot usage, configuration, and troubleshooting from bundled docs |\n\n`nanobot-document/references/` is generated from the root `docs/` directory by the Hatch build hook for wheels, source distributions, and editable installs. Edit `docs/` rather than the generated copies; rerun the build or editable install to refresh them. Source distributions also include `docs/` so wheels built from them retain the same documentation.\n","nanobot/skills/my/references/examples.md":"# My Tool — Practical Examples\n\nConcrete scenarios showing when and how to use the my tool effectively.\n\n## Diagnosis\n\n### \"Why can't you search the web?\"\n```\n→ my(action=\"check\", key=\"web_config.enable\")\n  → False\n→ \"Web search is disabled. Add web.enable: true to your config to enable it.\"\n```\n\n### \"Why did you stop?\"\n```\n→ my(action=\"check\", key=\"max_iterations\")\n  → 40\n→ \"I hit the iteration limit (40). The task was complex. I can ask the user if they want to increase it.\"\n```\n\n### \"What model are you running?\"\n```\n→ my(action=\"check\", key=\"model\")\n  → 'anthropic/claude-sonnet-4-6'\n→ my(action=\"check\", key=\"model_preset\")\n  → 'deep'\n```\n\n## Adaptive Behavior\n\n### Large codebase analysis\n```\n→ my(action=\"check\")\n  → context_window_tokens: 200000\n→ my(action=\"set\", key=\"model_preset\", value=\"deep\")\n  → \"Set model_preset = 'deep' for the next turn; context_window_tokens will be 262144\"\n→ \"I've selected the configured deep preset for this session's next turn.\"\n```\n\n### Switching to a configured model preset\n```\n→ my(action=\"set\", key=\"model_preset\", value=\"fast\")\n  → \"Set model_preset = 'fast' for the next turn; model will be 'openai/gpt-4.1-mini'\"\n→ \"Selected the fast preset for this session's next turn.\"\n```\n\n## Cross-Turn Memory\n\n### Remembering user preferences\n```\n# Turn 1: user says \"keep it brief\"\n→ my(action=\"set\", key=\"user_style\", value=\"concise\")\n  → \"Set scratchpad.user_style = 'concise'\"\n\n# Turn 3: new topic\n→ my(action=\"check\", key=\"user_style\")\n  → 'concise'\n  (adjusts response style accordingly)\n```\n\n### Tracking project context\n```\n→ my(action=\"set\", key=\"active_branch\", value=\"feat/auth\")\n→ my(action=\"set\", key=\"test_framework\", value=\"pytest\")\n→ my(action=\"set\", key=\"has_docker\", value=true)\n```\n","nanobot/skills/tmux/SKILL.md":"---\nname: tmux\ndescription: Use when a CLI task needs an interactive terminal or control of a tmux session.\nmetadata: {\"nanobot\":{\"emoji\":\"🧵\",\"os\":[\"darwin\",\"linux\"],\"requires\":{\"bins\":[\"tmux\"]}}}\n---\n\n# tmux Skill\n\nUse tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.\n\n## Quickstart (isolated socket, exec tool)\n\n```bash\nSOCKET_DIR=\"${NANOBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/nanobot-tmux-sockets}\"\nmkdir -p \"$SOCKET_DIR\"\nSOCKET=\"$SOCKET_DIR/nanobot.sock\"\nSESSION=nanobot-python\n\ntmux -S \"$SOCKET\" new -d -s \"$SESSION\" -n shell\ntmux -S \"$SOCKET\" send-keys -t \"$SESSION\":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter\ntmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\nAfter starting a session, always print monitor commands:\n\n```\nTo monitor:\n  tmux -S \"$SOCKET\" attach -t \"$SESSION\"\n  tmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\n## Socket convention\n\n- Use `NANOBOT_TMUX_SOCKET_DIR` environment variable.\n- Default socket path: `\"$NANOBOT_TMUX_SOCKET_DIR/nanobot.sock\"`.\n\n## Targeting panes and naming\n\n- Target format: `session:window.pane` (defaults to `:0.0`).\n- Keep names short; avoid spaces.\n- Inspect: `tmux -S \"$SOCKET\" list-sessions`, `tmux -S \"$SOCKET\" list-panes -a`.\n\n## Finding sessions\n\n- List sessions on your socket: `{baseDir}/scripts/find-sessions.sh -S \"$SOCKET\"`.\n- Scan all sockets: `{baseDir}/scripts/find-sessions.sh --all` (uses `NANOBOT_TMUX_SOCKET_DIR`).\n\n## Sending input safely\n\n- Prefer literal sends: `tmux -S \"$SOCKET\" send-keys -t target -l -- \"$cmd\"`.\n- Control keys: `tmux -S \"$SOCKET\" send-keys -t target C-c`.\n\n## Watching output\n\n- Capture recent history: `tmux -S \"$SOCKET\" capture-pane -p -J -t target -S -200`.\n- Wait for prompts: `{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern'`.\n- Attaching is OK; detach with `Ctrl+b d`.\n\n## Spawning processes\n\n- For python REPLs, set `PYTHON_BASIC_REPL=1` (non-basic REPL breaks send-keys flows).\n\n## Windows / WSL\n\n- tmux is supported on macOS/Linux. On Windows, use WSL and install tmux inside WSL.\n- This skill is gated to `darwin`/`linux` and requires `tmux` on PATH.\n\n## Orchestrating Coding Agents (Codex, Claude Code)\n\ntmux excels at running multiple coding agents in parallel:\n\n```bash\nSOCKET=\"${TMPDIR:-/tmp}/codex-army.sock\"\n\n# Create multiple sessions\nfor i in 1 2 3 4 5; do\n  tmux -S \"$SOCKET\" new-session -d -s \"agent-$i\"\ndone\n\n# Launch agents in different workdirs\ntmux -S \"$SOCKET\" send-keys -t agent-1 \"cd /tmp/project1 && codex --yolo 'Fix bug X'\" Enter\ntmux -S \"$SOCKET\" send-keys -t agent-2 \"cd /tmp/project2 && codex --yolo 'Fix bug Y'\" Enter\n\n# Poll for completion (check if prompt returned)\nfor sess in agent-1 agent-2; do\n  if tmux -S \"$SOCKET\" capture-pane -p -t \"$sess\" -S -3 | grep -q \"❯\"; then\n    echo \"$sess: DONE\"\n  else\n    echo \"$sess: Running...\"\n  fi\ndone\n\n# Get full output from completed session\ntmux -S \"$SOCKET\" capture-pane -p -t agent-1 -S -500\n```\n\n**Tips:**\n- Use separate git worktrees for parallel fixes (no branch conflicts)\n- `pnpm install` first before running codex in fresh clones\n- Check for shell prompt (`❯` or `$`) to detect completion\n- Codex needs `--yolo` or `--full-auto` for non-interactive fixes\n\n## Cleanup\n\n- Kill a session: `tmux -S \"$SOCKET\" kill-session -t \"$SESSION\"`.\n- Kill all sessions on a socket: `tmux -S \"$SOCKET\" list-sessions -F '#{session_name}' | xargs -r -n1 tmux -S \"$SOCKET\" kill-session -t`.\n- Remove everything on the private socket: `tmux -S \"$SOCKET\" kill-server`.\n\n## Helper: wait-for-text.sh\n\n`{baseDir}/scripts/wait-for-text.sh` polls a pane for a regex (or fixed string) with a timeout.\n\n```bash\n{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]\n```\n\n- `-t`/`--target` pane target (required)\n- `-p`/`--pattern` regex to match (required); add `-F` for fixed string\n- `-T` timeout seconds (integer, default 15)\n- `-i` poll interval seconds (default 0.5)\n- `-l` history lines to search (integer, default 1000)\n"},"files":{"nanobot/skills/cron/SKILL.md":"---\nname: cron\ndescription: Schedule reminders and recurring tasks.\n---\n\n# Cron\n\nUse the `cron` tool to schedule reminders or recurring tasks. New tasks run in the current chat. nanobot sends the agent's final reply to that chat. The user can change the task's chat in WebUI.\n\nWrite what to do in `message`. For a normal reminder or report, do not copy the current channel, chat ID, or instructions to call the `message` tool into the task. For example, use \"Remind me to drink water\", not \"Call message to send to this chat\".\n\nIf the user asks to send to other chats, preserve those recipients in the task instructions. Use the `message` tool for those sends and for file attachments. Existing tasks that explicitly request a `message` call still use it; changing the task's chat does not change explicit recipients in its instructions.\n\nChoose by timing and notification behavior, not repetition. A specified time or interval uses `cron`, even when it repeats: \"every day at 8am, remind me to drink water\" is a cron task. Use `HEARTBEAT.md` for background checks with flexible timing that should notify only on actionable changes. Heartbeat does not guarantee a requested time or interval; do not substitute it for an explicit schedule.\n\n## Task Types\n\n1. **Reminder** - the agent replies with the reminder when the task runs\n2. **Task** - the agent follows the instructions and replies with the result\n3. **One-time** - runs once at a specific time, then auto-deletes\n\n## Examples\n\nFixed reminder:\n```\ncron(action=\"add\", message=\"Time to take a break!\", every_seconds=1200)\n```\n\nDynamic task (agent executes each time):\n```\ncron(action=\"add\", message=\"Check HKUDS/nanobot GitHub stars and report\", every_seconds=600)\n```\n\nOne-time scheduled task (compute ISO datetime from current time):\n```\ncron(action=\"add\", message=\"Remind me about the meeting\", at=\"<ISO datetime>\")\n```\n\nTimezone-aware cron:\n```\ncron(action=\"add\", message=\"Morning standup\", cron_expr=\"0 9 * * 1-5\", tz=\"America/Vancouver\")\n```\n\nList/remove:\n```\ncron(action=\"list\")\ncron(action=\"remove\", job_id=\"abc123\")\n```\n\n## Time Expressions\n\n| User says | Parameters |\n|-----------|------------|\n| every 20 minutes | every_seconds: 1200 |\n| every hour | every_seconds: 3600 |\n| every day at 8am | cron_expr: \"0 8 * * *\" |\n| weekdays at 5pm | cron_expr: \"0 17 * * 1-5\" |\n| 9am Vancouver time daily | cron_expr: \"0 9 * * *\", tz: \"America/Vancouver\" |\n| at a specific time | at: ISO datetime string (compute from current time) |\n\n## Timezone\n\nUse `tz` with `cron_expr` to schedule in a specific IANA timezone. Without `tz`, the server's local timezone is used.\n","nanobot/skills/summarize/SKILL.md":"---\nname: summarize\ndescription: Summarize or extract text and transcripts from URLs, YouTube videos, podcasts, and local files.\nhomepage: https://summarize.sh\nmetadata: {\"nanobot\":{\"emoji\":\"🧾\",\"requires\":{\"bins\":[\"summarize\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"steipete/tap/summarize\",\"bins\":[\"summarize\"],\"label\":\"Install summarize (brew)\"}]}}\n---\n\n# Summarize\n\nFast CLI to summarize URLs, local files, and YouTube links.\n\n## When to use (trigger phrases)\n\nUse this skill immediately when the user asks any of:\n- “use summarize.sh”\n- “what’s this link/video about?”\n- “summarize this URL/article”\n- “transcribe this YouTube/video” (best-effort transcript extraction; no `yt-dlp` needed)\n\n## Quick start\n\n```bash\nsummarize \"https://example.com\" --model google/gemini-3-flash-preview\nsummarize \"/path/to/file.pdf\" --model google/gemini-3-flash-preview\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto\n```\n\n## YouTube: summary vs transcript\n\nBest-effort transcript (URLs only):\n\n```bash\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto --extract-only\n```\n\nIf the user asked for a transcript but it’s huge, return a tight summary first, then ask which section/time range to expand.\n\n## Model + keys\n\nSet the API key for your chosen provider:\n- OpenAI: `OPENAI_API_KEY`\n- Anthropic: `ANTHROPIC_API_KEY`\n- xAI: `XAI_API_KEY`\n- Google: `GEMINI_API_KEY` (aliases: `GOOGLE_GENERATIVE_AI_API_KEY`, `GOOGLE_API_KEY`)\n\nDefault model is `google/gemini-3-flash-preview` if none is set.\n\n## Useful flags\n\n- `--length short|medium|long|xl|xxl|<chars>`\n- `--max-output-tokens <count>`\n- `--extract-only` (URLs only)\n- `--json` (machine readable)\n- `--firecrawl auto|off|always` (fallback extraction)\n- `--youtube auto` (Apify fallback if `APIFY_API_TOKEN` set)\n\n## Config\n\nOptional config file: `~/.summarize/config.json`\n\n```json\n{ \"model\": \"openai/gpt-5.2\" }\n```\n\nOptional services:\n- `FIRECRAWL_API_KEY` for blocked sites\n- `APIFY_API_TOKEN` for YouTube fallback\n","nanobot/skills/clawhub/SKILL.md":"---\nname: clawhub\ndescription: Search and install agent skills from ClawHub, the public skill registry.\nhomepage: https://clawhub.ai\nmetadata: {\"nanobot\":{\"emoji\":\"🦞\"}}\n---\n\n# ClawHub\n\nPublic skill registry for AI agents. Search by natural language (vector search).\n\n## When to use\n\nUse this skill when the user asks any of:\n- \"find a skill for …\"\n- \"search for skills\"\n- \"install a skill\"\n- \"what skills are available?\"\n- \"update my skills\"\n\n## Search\n\n```bash\nnpx --yes clawhub@latest search \"web scraping\" --limit 5\n```\n\n## Install\n\n```bash\nnpx --yes clawhub@latest install <slug> --workdir ~/.nanobot/workspace\n```\n\nReplace `<slug>` with the skill name from search results. This places the skill into `~/.nanobot/workspace/skills/`, where nanobot loads workspace skills from. Always include `--workdir`.\n\n## Update\n\n```bash\nnpx --yes clawhub@latest update --all --workdir ~/.nanobot/workspace\n```\n\n## List installed\n\n```bash\nnpx --yes clawhub@latest list --workdir ~/.nanobot/workspace\n```\n\n## Notes\n\n- Requires Node.js (`npx` comes with it).\n- No API key needed for search and install.\n- Login (`npx --yes clawhub@latest login`) is only required for publishing.\n- `--workdir ~/.nanobot/workspace` is critical — without it, skills install to the current directory instead of the nanobot workspace.\n- After install, remind the user to start a new session to load the skill.\n","nanobot/skills/my/SKILL.md":"---\nname: my\ndescription: Inspect or troubleshoot the agent's runtime state, adjust runtime settings, or keep temporary session notes.\n---\n\n# Self-Awareness\n\n## How to use\n\n1. **Identify the situation** from the categories below\n2. **Call the my tool** with the appropriate action\n3. **If set**, warn the user before changing impactful settings such as the model or runtime limits\n4. **For detailed examples**, read [references/examples.md](references/examples.md)\n\n## When to check\n\n<rule>\n**Diagnose before explaining.** When something doesn't work, check your state first.\n</rule>\n\n<rule>\n**Check budget before complex tasks.** Know your limits before committing.\n</rule>\n\n<rule>\n**Recall across turns.** Store preferences in your scratchpad, read them back later.\n</rule>\n\n## When to set\n\n<rule>\n**Only set when benefit is clear and user is informed.** Warn before changing model.\n</rule>\n\n| Situation | Command |\n|-----------|---------|\n| Check capacity for a large task | `my(action=\"check\", key=\"context_window_tokens\")` |\n| Switch model or context capacity | `my(action=\"set\", key=\"model_preset\", value=\"<preset-name>\")` |\n| Long multi-step task | `my(action=\"set\", key=\"max_iterations\", value=80)` |\n\n**Tradeoff:** Bias toward stability. Only set when defaults are genuinely insufficient.\n\n## Anti-patterns\n\n<rule>\n**Don't check every turn.** Costs a tool call. Use when you need information, not reflexively.\n</rule>\n\n<rule>\n**Don't store sensitive data.** No API keys, passwords, or tokens in scratchpad.\n</rule>\n\n<rule>\n**Don't set workspace.** Does not update file tool boundaries — won't work.\n</rule>\n\n## Constraints\n\n- `model_preset` is saved for the current session; other modifications are in-memory only\n- Direct `model` and `context_window_tokens` writes are rejected during active sessions because they would change the shared instance default. Use a configured `model_preset` instead.\n- Protected params have type/range validation: `max_iterations` (1–100), `context_window_tokens` (4096–1M), `model` (non-empty str)\n- If `tools.my.allow_set` is false, check only\n\n## Related tools\n\n| Need | Use | Persists? |\n|------|-----|-----------|\n| Per-session temp state | `my(action=\"set\", key=\"...\", value=...)` | No |\n| Long-term facts | Memory skill (`MEMORY.md`, `USER.md`) | Yes |\n| Permanent config change | Edit config file | Yes |\n\n**Rule of thumb:** Tomorrow? Memory. This turn only? My.\n","nanobot/skills/github/SKILL.md":"---\nname: github\ndescription: \"Manage GitHub issues and pull requests, inspect CI runs, and query repository data.\"\nmetadata: {\"nanobot\":{\"emoji\":\"🐙\",\"requires\":{\"bins\":[\"gh\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (brew)\"},{\"id\":\"apt\",\"kind\":\"apt\",\"package\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (apt)\"}]}}\n---\n\n# GitHub Skill\n\nUse the `gh` CLI to interact with GitHub. Always specify `--repo owner/repo` when not in a git directory, or use URLs directly.\n\n## Pull Requests\n\nCheck CI status on a PR:\n```bash\ngh pr checks 55 --repo owner/repo\n```\n\nList recent workflow runs:\n```bash\ngh run list --repo owner/repo --limit 10\n```\n\nView a run and see which steps failed:\n```bash\ngh run view <run-id> --repo owner/repo\n```\n\nView logs for failed steps only:\n```bash\ngh run view <run-id> --repo owner/repo --log-failed\n```\n\n## API for Advanced Queries\n\nThe `gh api` command is useful for accessing data not available through other subcommands.\n\nGet PR with specific fields:\n```bash\ngh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'\n```\n\n## JSON Output\n\nMost commands support `--json` for structured output.  You can use `--jq` to filter:\n\n```bash\ngh issue list --repo owner/repo --json number,title --jq '.[] | \"\\(.number): \\(.title)\"'\n```\n","nanobot/skills/memory/SKILL.md":"---\nname: memory\ndescription: Search past conversations in the agent's history log.\n---\n\n# Memory\n\n## Search Past Events\n\nSearch the exact `History log` path from the system prompt using an available text-search\ntool. This path belongs to the agent workspace, which can differ from the current project.\n\nThe append-only JSONL log stores `cursor`, `timestamp`, and `content` per entry. Retrieve\nentries on demand by topic or date, and inspect neighboring entries when context matters.\n","nanobot/skills/skill-creator/SKILL.md":"---\nname: skill-creator\ndescription: Create, update, or package agent skills.\n---\n\n# Skill Creator\n\nThis skill provides guidance for creating effective skills.\n\n## About Skills\n\nSkills are modular, self-contained packages that extend the agent's capabilities by providing\nspecialized knowledge, workflows, and tools. Think of them as \"onboarding guides\" for specific\ndomains or tasks—they transform the agent from a general-purpose agent into a specialized agent\nequipped with procedural knowledge that no model can fully possess.\n\n### What Skills Provide\n\n1. Specialized workflows - Multi-step procedures for specific domains\n2. Tool integrations - Instructions for working with specific file formats or APIs\n3. Domain expertise - Company-specific knowledge, schemas, business logic\n4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks\n\n## Core Principles\n\n### Concise is Key\n\nThe context window is a public good. Skills share the context window with everything else the agent needs: system prompt, conversation history, other Skills' metadata, and the actual user request.\n\n**Default assumption: the agent is already very smart.** Only add context the agent doesn't already have. Challenge each piece of information: \"Does the agent really need this explanation?\" and \"Does this paragraph justify its token cost?\"\n\nPrefer concise examples over verbose explanations.\n\n### Set Appropriate Degrees of Freedom\n\nMatch the level of specificity to the task's fragility and variability:\n\n**High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.\n\n**Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.\n\n**Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.\n\nThink of the agent as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).\n\n### Anatomy of a Skill\n\nEvery skill consists of a required SKILL.md file and optional bundled resources:\n\n```\nskill-name/\n├── SKILL.md (required)\n│   ├── YAML frontmatter metadata (required)\n│   │   ├── name: (required)\n│   │   └── description: (required)\n│   └── Markdown instructions (required)\n└── Bundled Resources (optional)\n    ├── scripts/          - Executable code (Python/Bash/etc.)\n    ├── references/       - Documentation intended to be loaded into context as needed\n    └── assets/           - Files used in output (templates, icons, fonts, etc.)\n```\n\n#### SKILL.md (required)\n\nEvery SKILL.md consists of:\n\n- **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that the agent reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.\n- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).\n\n#### Bundled Resources (optional)\n\n##### Scripts (`scripts/`)\n\nExecutable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.\n\n- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed\n- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks\n- **Benefits**: Token efficient, deterministic, may be executed without loading into context\n- **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments\n\n##### References (`references/`)\n\nDocumentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking.\n\n- **When to include**: For documentation that the agent should reference while working\n- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications\n- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides\n- **Benefits**: Keeps SKILL.md lean, loaded only when the agent determines it's needed\n- **Best practice**: If files are large (>10k words), include grep patterns in SKILL.md so the agent can use built-in search tools efficiently; mention when the default `grep(output_mode=\"files_with_matches\")`, `grep(output_mode=\"count\")`, `grep(fixed_strings=true)`, or pagination via `head_limit` / `offset` is the right first step\n- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.\n\n##### Assets (`assets/`)\n\nFiles not intended to be loaded into context, but rather used within the output the agent produces.\n\n- **When to include**: When the skill needs files that will be used in the final output\n- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography\n- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified\n- **Benefits**: Separates output resources from documentation, enables the agent to use files without loading them into context\n\n#### What to Not Include in a Skill\n\nA skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:\n\n- README.md\n- INSTALLATION_GUIDE.md\n- QUICK_REFERENCE.md\n- CHANGELOG.md\n- etc.\n\nThe skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.\n\n### Progressive Disclosure Design Principle\n\nSkills use a three-level loading system to manage context efficiently:\n\n1. **Metadata (name + description)** - Always in context (~100 words)\n2. **SKILL.md body** - When skill triggers (<5k words)\n3. **Bundled resources** - As needed by the agent (Unlimited because scripts can be executed without reading into context window)\n\n#### Progressive Disclosure Patterns\n\nKeep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.\n\n**Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.\n\n**Pattern 1: High-level guide with references**\n\n```markdown\n# PDF Processing\n\n## Quick start\n\nExtract text with pdfplumber:\n[code example]\n\n## Advanced features\n\n- **Form filling**: See [FORMS.md](FORMS.md) for complete guide\n- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods\n- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns\n```\n\nthe agent loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.\n\n**Pattern 2: Domain-specific organization**\n\nFor Skills with multiple domains, organize content by domain to avoid loading irrelevant context:\n\n```\nbigquery-skill/\n├── SKILL.md (overview and navigation)\n└── reference/\n    ├── finance.md (revenue, billing metrics)\n    ├── sales.md (opportunities, pipeline)\n    ├── product.md (API usage, features)\n    └── marketing.md (campaigns, attribution)\n```\n\nWhen a user asks about sales metrics, the agent only reads sales.md.\n\nSimilarly, for skills supporting multiple frameworks or variants, organize by variant:\n\n```\ncloud-deploy/\n├── SKILL.md (workflow + provider selection)\n└── references/\n    ├── aws.md (AWS deployment patterns)\n    ├── gcp.md (GCP deployment patterns)\n    └── azure.md (Azure deployment patterns)\n```\n\nWhen the user chooses AWS, the agent only reads aws.md.\n\n**Pattern 3: Conditional details**\n\nShow basic content, link to advanced content:\n\n```markdown\n# DOCX Processing\n\n## Creating documents\n\nUse docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).\n\n## Editing documents\n\nFor simple edits, modify the XML directly.\n\n**For tracked changes**: See [REDLINING.md](REDLINING.md)\n**For OOXML details**: See [OOXML.md](OOXML.md)\n```\n\nthe agent reads REDLINING.md or OOXML.md only when the user needs those features.\n\n**Important guidelines:**\n\n- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.\n- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so the agent can see the full scope when previewing.\n\n## Skill Creation Process\n\nSkill creation involves these steps:\n\n1. Understand the skill with concrete examples\n2. Plan reusable skill contents (scripts, references, assets)\n3. Initialize the skill (run init_skill.py)\n4. Edit the skill (implement resources and write SKILL.md)\n5. Package the skill (run package_skill.py)\n6. Iterate based on real usage\n\nFollow these steps in order, skipping only if there is a clear reason why they are not applicable.\n\n### Skill Naming\n\n- Use lowercase letters, digits, and hyphens only; normalize user-provided titles to hyphen-case (e.g., \"Plan Mode\" -> `plan-mode`).\n- When generating names, generate a name under 64 characters (letters, digits, hyphens).\n- Prefer short, verb-led phrases that describe the action.\n- Namespace by tool when it improves clarity or triggering (e.g., `gh-address-comments`, `linear-address-issue`).\n- Name the skill folder exactly after the skill name.\n\n### Step 1: Understanding the Skill with Concrete Examples\n\nSkip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.\n\nTo create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.\n\nFor example, when building an image-editor skill, relevant questions include:\n\n- \"What functionality should the image-editor skill support? Editing, rotating, anything else?\"\n- \"Can you give some examples of how this skill would be used?\"\n- \"I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?\"\n- \"What would a user say that should trigger this skill?\"\n\nTo avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.\n\nConclude this step when there is a clear sense of the functionality the skill should support.\n\n### Step 2: Planning the Reusable Skill Contents\n\nTo turn concrete examples into an effective skill, analyze each example by:\n\n1. Considering how to execute on the example from scratch\n2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly\n\nExample: When building a `pdf-editor` skill to handle queries like \"Help me rotate this PDF,\" the analysis shows:\n\n1. Rotating a PDF requires re-writing the same code each time\n2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill\n\nExample: When designing a `frontend-webapp-builder` skill for queries like \"Build me a todo app\" or \"Build me a dashboard to track my steps,\" the analysis shows:\n\n1. Writing a frontend webapp requires the same boilerplate HTML/React each time\n2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill\n\nExample: When building a `big-query` skill to handle queries like \"How many users have logged in today?\" the analysis shows:\n\n1. Querying BigQuery requires re-discovering the table schemas and relationships each time\n2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill\n\nTo establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.\n\n### Step 3: Initializing the Skill\n\nAt this point, it is time to actually create the skill.\n\nSkip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.\n\nWhen creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.\n\nFor `nanobot`, custom skills should live under the active workspace `skills/` directory so they can be discovered automatically at runtime (for example, `<workspace>/skills/my-skill/SKILL.md`).\n\nUsage:\n\n```bash\nscripts/init_skill.py <skill-name> --path <output-directory> [--resources scripts,references,assets] [--examples]\n```\n\nExamples:\n\n```bash\nscripts/init_skill.py my-skill --path ./workspace/skills\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts,references\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts --examples\n```\n\nThe script:\n\n- Creates the skill directory at the specified path\n- Generates a SKILL.md template with proper frontmatter and TODO placeholders\n- Optionally creates resource directories based on `--resources`\n- Optionally adds example files when `--examples` is set\n\nAfter initialization, customize the SKILL.md and add resources as needed. If you used `--examples`, replace or delete placeholder files.\n\n### Step 4: Edit the Skill\n\nWhen editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of the agent to use. Include information that would be beneficial and non-obvious to the agent. Consider what procedural knowledge, domain-specific details, or reusable assets would help another agent instance execute these tasks more effectively.\n\n#### Learn Proven Design Patterns\n\nConsult these helpful guides based on your skill's needs:\n\n- **Multi-step processes**: See references/workflows.md for sequential workflows and conditional logic\n- **Specific output formats or quality standards**: See references/output-patterns.md for template and example patterns\n\nThese files contain established best practices for effective skill design.\n\n#### Start with Reusable Skill Contents\n\nTo begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.\n\nAdded scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.\n\nIf you used `--examples`, delete any placeholder files that are not needed for the skill. Only create resource directories that are actually required.\n\n#### Update SKILL.md\n\n**Writing Guidelines:** Always use imperative/infinitive form.\n\n##### Frontmatter\n\nWrite the YAML frontmatter with `name` and `description`:\n\n- `name`: The skill name\n- `description`: This is the primary triggering mechanism for your skill, and helps the agent understand when to use the skill.\n  - Include both what the Skill does and specific triggers/contexts for when to use it.\n  - Include all \"when to use\" information here - Not in the body. The body is only loaded after triggering, so \"When to Use This Skill\" sections in the body are not helpful to the agent.\n  - Example description for a `docx` skill: \"Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when the agent needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks\"\n\nKeep frontmatter minimal. In `nanobot`, `metadata` and `always` are also supported when needed, but avoid adding extra fields unless they are actually required.\n\n##### Body\n\nWrite instructions for using the skill and its bundled resources.\n\n### Step 5: Packaging a Skill\n\nOnce development of the skill is complete, it must be packaged into a distributable .skill file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder>\n```\n\nOptional output directory specification:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder> ./dist\n```\n\nThe packaging script will:\n\n1. **Validate** the skill automatically, checking:\n   - YAML frontmatter format and required fields\n   - Skill naming conventions and directory structure\n   - Description completeness and quality\n   - File organization and resource references\n\n2. **Package** the skill if validation passes, creating a .skill file named after the skill (e.g., `my-skill.skill`) that includes all files and maintains the proper directory structure for distribution. The .skill file is a zip file with a .skill extension.\n\n   Security restriction: symlinks are rejected and packaging fails when any symlink is present.\n\nIf validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.\n\n### Step 6: Iterate\n\nAfter testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.\n\n**Iteration workflow:**\n\n1. Use the skill on real tasks\n2. Notice struggles or inefficiencies\n3. Identify how SKILL.md or bundled resources should be updated\n4. Implement changes and test again\n","nanobot/skills/weather/SKILL.md":"---\nname: weather\ndescription: Get current weather and forecasts.\nhomepage: https://wttr.in/:help\nmetadata: {\"nanobot\":{\"emoji\":\"🌤️\",\"requires\":{\"bins\":[\"curl\"]}}}\n---\n\n# Weather\n\nTwo free services, no API keys needed.\n\n## wttr.in (primary)\n\nChoose one request that matches the user's scope. Do not fetch current\nconditions separately when a today or forecast request already includes them.\n\nPlatform notes:\n- On Windows PowerShell, use `curl.exe`; bare `curl` may resolve to\n  `Invoke-WebRequest`.\n- On macOS and Linux, use `curl`.\n\nCurrent conditions only:\n```bash\ncurl -s \"https://wttr.in/London?format=3\"\n# Output: London: ⛅️ +8°C\n```\n\nCustom current conditions format:\n```bash\ncurl -s \"https://wttr.in/London?format=%l:+%c+%t+%h+%w\"\n# Output: London: ⛅️ +8°C 71% ↙5km/h\n```\n\nToday's weather, including current conditions (use this single request for\nquestions about today's weather):\n```bash\ncurl -s \"https://wttr.in/London?1&m\"\n```\n\nFull forecast:\n```bash\ncurl -s \"https://wttr.in/London?T&m\"\n```\n\nOn Windows PowerShell, replace `curl` with `curl.exe` in the commands above.\n\nFormat codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon\n\nTips:\n- URL-encode spaces: `wttr.in/New+York`\n- Airport codes: `wttr.in/JFK`\n- Units: `?m` (metric) `?u` (USCS)\n- Today only: `?1` · Current only: `?0`\n- PNG (macOS/Linux): `curl -s \"https://wttr.in/Berlin.png\" -o weather.png`\n- PNG (Windows PowerShell): `curl.exe -s \"https://wttr.in/Berlin.png\" -o weather.png`\n\n## Open-Meteo (fallback, JSON)\n\nFree, no key, good for programmatic use:\n```bash\ncurl -s \"https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true\"\n```\n\nFind coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.\n\nDocs: https://open-meteo.com/en/docs\n","nanobot/skills/README.md":"# nanobot Skills\n\nThis directory contains built-in skills that extend nanobot's capabilities.\n\n## Skill Format\n\nEach skill is a directory containing a `SKILL.md` file with:\n- YAML frontmatter (name, description, metadata)\n- Markdown instructions for the agent\n\nWhen skills reference large local documentation or logs, prefer nanobot's built-in `grep` tool to narrow the search space before loading full files. Use `grep(output_mode=\"count\")` / `files_with_matches` for broad searches first, use `head_limit` / `offset` to page through large result sets, and `grep(glob=\"*.md\")` to filter by file name pattern.\n\n## Attribution\n\nThese skills are adapted from [OpenClaw](https://github.com/openclaw/openclaw)'s skill system. The skill format and metadata structure follow OpenClaw's conventions to maintain compatibility.\n\n## Available Skills\n\n| Skill | Description |\n|-------|-------------|\n| `github` | Interact with GitHub using the `gh` CLI |\n| `weather` | Get weather info using wttr.in and Open-Meteo |\n| `summarize` | Summarize URLs, files, and YouTube videos |\n| `tmux` | Remote-control tmux sessions |\n| `clawhub` | Search and install skills from ClawHub registry |\n| `skill-creator` | Create new skills |\n| `nanobot-document` | Explain nanobot usage, configuration, and troubleshooting from bundled docs |\n\n`nanobot-document/references/` is generated from the root `docs/` directory by the Hatch build hook for wheels, source distributions, and editable installs. Edit `docs/` rather than the generated copies; rerun the build or editable install to refresh them. Source distributions also include `docs/` so wheels built from them retain the same documentation.\n","nanobot/skills/my/references/examples.md":"# My Tool — Practical Examples\n\nConcrete scenarios showing when and how to use the my tool effectively.\n\n## Diagnosis\n\n### \"Why can't you search the web?\"\n```\n→ my(action=\"check\", key=\"web_config.enable\")\n  → False\n→ \"Web search is disabled. Add web.enable: true to your config to enable it.\"\n```\n\n### \"Why did you stop?\"\n```\n→ my(action=\"check\", key=\"max_iterations\")\n  → 40\n→ \"I hit the iteration limit (40). The task was complex. I can ask the user if they want to increase it.\"\n```\n\n### \"What model are you running?\"\n```\n→ my(action=\"check\", key=\"model\")\n  → 'anthropic/claude-sonnet-4-6'\n→ my(action=\"check\", key=\"model_preset\")\n  → 'deep'\n```\n\n## Adaptive Behavior\n\n### Large codebase analysis\n```\n→ my(action=\"check\")\n  → context_window_tokens: 200000\n→ my(action=\"set\", key=\"model_preset\", value=\"deep\")\n  → \"Set model_preset = 'deep' for the next turn; context_window_tokens will be 262144\"\n→ \"I've selected the configured deep preset for this session's next turn.\"\n```\n\n### Switching to a configured model preset\n```\n→ my(action=\"set\", key=\"model_preset\", value=\"fast\")\n  → \"Set model_preset = 'fast' for the next turn; model will be 'openai/gpt-4.1-mini'\"\n→ \"Selected the fast preset for this session's next turn.\"\n```\n\n## Cross-Turn Memory\n\n### Remembering user preferences\n```\n# Turn 1: user says \"keep it brief\"\n→ my(action=\"set\", key=\"user_style\", value=\"concise\")\n  → \"Set scratchpad.user_style = 'concise'\"\n\n# Turn 3: new topic\n→ my(action=\"check\", key=\"user_style\")\n  → 'concise'\n  (adjusts response style accordingly)\n```\n\n### Tracking project context\n```\n→ my(action=\"set\", key=\"active_branch\", value=\"feat/auth\")\n→ my(action=\"set\", key=\"test_framework\", value=\"pytest\")\n→ my(action=\"set\", key=\"has_docker\", value=true)\n```\n","nanobot/skills/tmux/SKILL.md":"---\nname: tmux\ndescription: Use when a CLI task needs an interactive terminal or control of a tmux session.\nmetadata: {\"nanobot\":{\"emoji\":\"🧵\",\"os\":[\"darwin\",\"linux\"],\"requires\":{\"bins\":[\"tmux\"]}}}\n---\n\n# tmux Skill\n\nUse tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.\n\n## Quickstart (isolated socket, exec tool)\n\n```bash\nSOCKET_DIR=\"${NANOBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/nanobot-tmux-sockets}\"\nmkdir -p \"$SOCKET_DIR\"\nSOCKET=\"$SOCKET_DIR/nanobot.sock\"\nSESSION=nanobot-python\n\ntmux -S \"$SOCKET\" new -d -s \"$SESSION\" -n shell\ntmux -S \"$SOCKET\" send-keys -t \"$SESSION\":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter\ntmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\nAfter starting a session, always print monitor commands:\n\n```\nTo monitor:\n  tmux -S \"$SOCKET\" attach -t \"$SESSION\"\n  tmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\n## Socket convention\n\n- Use `NANOBOT_TMUX_SOCKET_DIR` environment variable.\n- Default socket path: `\"$NANOBOT_TMUX_SOCKET_DIR/nanobot.sock\"`.\n\n## Targeting panes and naming\n\n- Target format: `session:window.pane` (defaults to `:0.0`).\n- Keep names short; avoid spaces.\n- Inspect: `tmux -S \"$SOCKET\" list-sessions`, `tmux -S \"$SOCKET\" list-panes -a`.\n\n## Finding sessions\n\n- List sessions on your socket: `{baseDir}/scripts/find-sessions.sh -S \"$SOCKET\"`.\n- Scan all sockets: `{baseDir}/scripts/find-sessions.sh --all` (uses `NANOBOT_TMUX_SOCKET_DIR`).\n\n## Sending input safely\n\n- Prefer literal sends: `tmux -S \"$SOCKET\" send-keys -t target -l -- \"$cmd\"`.\n- Control keys: `tmux -S \"$SOCKET\" send-keys -t target C-c`.\n\n## Watching output\n\n- Capture recent history: `tmux -S \"$SOCKET\" capture-pane -p -J -t target -S -200`.\n- Wait for prompts: `{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern'`.\n- Attaching is OK; detach with `Ctrl+b d`.\n\n## Spawning processes\n\n- For python REPLs, set `PYTHON_BASIC_REPL=1` (non-basic REPL breaks send-keys flows).\n\n## Windows / WSL\n\n- tmux is supported on macOS/Linux. On Windows, use WSL and install tmux inside WSL.\n- This skill is gated to `darwin`/`linux` and requires `tmux` on PATH.\n\n## Orchestrating Coding Agents (Codex, Claude Code)\n\ntmux excels at running multiple coding agents in parallel:\n\n```bash\nSOCKET=\"${TMPDIR:-/tmp}/codex-army.sock\"\n\n# Create multiple sessions\nfor i in 1 2 3 4 5; do\n  tmux -S \"$SOCKET\" new-session -d -s \"agent-$i\"\ndone\n\n# Launch agents in different workdirs\ntmux -S \"$SOCKET\" send-keys -t agent-1 \"cd /tmp/project1 && codex --yolo 'Fix bug X'\" Enter\ntmux -S \"$SOCKET\" send-keys -t agent-2 \"cd /tmp/project2 && codex --yolo 'Fix bug Y'\" Enter\n\n# Poll for completion (check if prompt returned)\nfor sess in agent-1 agent-2; do\n  if tmux -S \"$SOCKET\" capture-pane -p -t \"$sess\" -S -3 | grep -q \"❯\"; then\n    echo \"$sess: DONE\"\n  else\n    echo \"$sess: Running...\"\n  fi\ndone\n\n# Get full output from completed session\ntmux -S \"$SOCKET\" capture-pane -p -t agent-1 -S -500\n```\n\n**Tips:**\n- Use separate git worktrees for parallel fixes (no branch conflicts)\n- `pnpm install` first before running codex in fresh clones\n- Check for shell prompt (`❯` or `$`) to detect completion\n- Codex needs `--yolo` or `--full-auto` for non-interactive fixes\n\n## Cleanup\n\n- Kill a session: `tmux -S \"$SOCKET\" kill-session -t \"$SESSION\"`.\n- Kill all sessions on a socket: `tmux -S \"$SOCKET\" list-sessions -F '#{session_name}' | xargs -r -n1 tmux -S \"$SOCKET\" kill-session -t`.\n- Remove everything on the private socket: `tmux -S \"$SOCKET\" kill-server`.\n\n## Helper: wait-for-text.sh\n\n`{baseDir}/scripts/wait-for-text.sh` polls a pane for a regex (or fixed string) with a timeout.\n\n```bash\n{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]\n```\n\n- `-t`/`--target` pane target (required)\n- `-p`/`--pattern` regex to match (required); add `-F` for fixed string\n- `-T` timeout seconds (integer, default 15)\n- `-i` poll interval seconds (default 0.5)\n- `-l` history lines to search (integer, default 1000)\n"},"items":[{"name":"SKILL.md","path":"nanobot/skills/clawhub/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/clawhub/SKILL.md","title":"clawhub","category":"anthropic-skill","format":"markdown","content":"---\nname: clawhub\ndescription: Search and install agent skills from ClawHub, the public skill registry.\nhomepage: https://clawhub.ai\nmetadata: {\"nanobot\":{\"emoji\":\"🦞\"}}\n---\n\n# ClawHub\n\nPublic skill registry for AI agents. Search by natural language (vector search).\n\n## When to use\n\nUse this skill when the user asks any of:\n- \"find a skill for …\"\n- \"search for skills\"\n- \"install a skill\"\n- \"what skills are available?\"\n- \"update my skills\"\n\n## Search\n\n```bash\nnpx --yes clawhub@latest search \"web scraping\" --limit 5\n```\n\n## Install\n\n```bash\nnpx --yes clawhub@latest install <slug> --workdir ~/.nanobot/workspace\n```\n\nReplace `<slug>` with the skill name from search results. This places the skill into `~/.nanobot/workspace/skills/`, where nanobot loads workspace skills from. Always include `--workdir`.\n\n## Update\n\n```bash\nnpx --yes clawhub@latest update --all --workdir ~/.nanobot/workspace\n```\n\n## List installed\n\n```bash\nnpx --yes clawhub@latest list --workdir ~/.nanobot/workspace\n```\n\n## Notes\n\n- Requires Node.js (`npx` comes with it).\n- No API key needed for search and install.\n- Login (`npx --yes clawhub@latest login`) is only required for publishing.\n- `--workdir ~/.nanobot/workspace` is critical — without it, skills install to the current directory instead of the nanobot workspace.\n- After install, remind the user to start a new session to load the skill.\n","frontmatter":{"name":"clawhub","description":"Search and install agent skills from ClawHub, the public skill registry.","homepage":"https://clawhub.ai","metadata":{"nanobot":{"emoji":"🦞"}}},"isInternal":false,"tokens":350,"sizeBytes":1384},{"name":"SKILL.md","path":"nanobot/skills/cron/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/cron/SKILL.md","title":"cron","category":"anthropic-skill","format":"markdown","content":"---\nname: cron\ndescription: Schedule reminders and recurring tasks.\n---\n\n# Cron\n\nUse the `cron` tool to schedule reminders or recurring tasks. New tasks run in the current chat. nanobot sends the agent's final reply to that chat. The user can change the task's chat in WebUI.\n\nWrite what to do in `message`. For a normal reminder or report, do not copy the current channel, chat ID, or instructions to call the `message` tool into the task. For example, use \"Remind me to drink water\", not \"Call message to send to this chat\".\n\nIf the user asks to send to other chats, preserve those recipients in the task instructions. Use the `message` tool for those sends and for file attachments. Existing tasks that explicitly request a `message` call still use it; changing the task's chat does not change explicit recipients in its instructions.\n\nChoose by timing and notification behavior, not repetition. A specified time or interval uses `cron`, even when it repeats: \"every day at 8am, remind me to drink water\" is a cron task. Use `HEARTBEAT.md` for background checks with flexible timing that should notify only on actionable changes. Heartbeat does not guarantee a requested time or interval; do not substitute it for an explicit schedule.\n\n## Task Types\n\n1. **Reminder** - the agent replies with the reminder when the task runs\n2. **Task** - the agent follows the instructions and replies with the result\n3. **One-time** - runs once at a specific time, then auto-deletes\n\n## Examples\n\nFixed reminder:\n```\ncron(action=\"add\", message=\"Time to take a break!\", every_seconds=1200)\n```\n\nDynamic task (agent executes each time):\n```\ncron(action=\"add\", message=\"Check HKUDS/nanobot GitHub stars and report\", every_seconds=600)\n```\n\nOne-time scheduled task (compute ISO datetime from current time):\n```\ncron(action=\"add\", message=\"Remind me about the meeting\", at=\"<ISO datetime>\")\n```\n\nTimezone-aware cron:\n```\ncron(action=\"add\", message=\"Morning standup\", cron_expr=\"0 9 * * 1-5\", tz=\"America/Vancouver\")\n```\n\nList/remove:\n```\ncron(action=\"list\")\ncron(action=\"remove\", job_id=\"abc123\")\n```\n\n## Time Expressions\n\n| User says | Parameters |\n|-----------|------------|\n| every 20 minutes | every_seconds: 1200 |\n| every hour | every_seconds: 3600 |\n| every day at 8am | cron_expr: \"0 8 * * *\" |\n| weekdays at 5pm | cron_expr: \"0 17 * * 1-5\" |\n| 9am Vancouver time daily | cron_expr: \"0 9 * * *\", tz: \"America/Vancouver\" |\n| at a specific time | at: ISO datetime string (compute from current time) |\n\n## Timezone\n\nUse `tz` with `cron_expr` to schedule in a specific IANA timezone. Without `tz`, the server's local timezone is used.\n","frontmatter":{"name":"cron","description":"Schedule reminders and recurring tasks."},"isInternal":false,"tokens":646,"sizeBytes":2622},{"name":"SKILL.md","path":"nanobot/skills/github/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/github/SKILL.md","title":"github","category":"anthropic-skill","format":"markdown","content":"---\nname: github\ndescription: \"Manage GitHub issues and pull requests, inspect CI runs, and query repository data.\"\nmetadata: {\"nanobot\":{\"emoji\":\"🐙\",\"requires\":{\"bins\":[\"gh\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (brew)\"},{\"id\":\"apt\",\"kind\":\"apt\",\"package\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (apt)\"}]}}\n---\n\n# GitHub Skill\n\nUse the `gh` CLI to interact with GitHub. Always specify `--repo owner/repo` when not in a git directory, or use URLs directly.\n\n## Pull Requests\n\nCheck CI status on a PR:\n```bash\ngh pr checks 55 --repo owner/repo\n```\n\nList recent workflow runs:\n```bash\ngh run list --repo owner/repo --limit 10\n```\n\nView a run and see which steps failed:\n```bash\ngh run view <run-id> --repo owner/repo\n```\n\nView logs for failed steps only:\n```bash\ngh run view <run-id> --repo owner/repo --log-failed\n```\n\n## API for Advanced Queries\n\nThe `gh api` command is useful for accessing data not available through other subcommands.\n\nGet PR with specific fields:\n```bash\ngh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'\n```\n\n## JSON Output\n\nMost commands support `--json` for structured output.  You can use `--jq` to filter:\n\n```bash\ngh issue list --repo owner/repo --json number,title --jq '.[] | \"\\(.number): \\(.title)\"'\n```\n","frontmatter":{"name":"github","description":"Manage GitHub issues and pull requests, inspect CI runs, and query repository data.","metadata":{"nanobot":{"emoji":"🐙","requires":{"bins":["gh"]},"install":[{"id":"brew","kind":"brew","formula":"gh","bins":["gh"],"label":"Install GitHub CLI (brew)"},{"id":"apt","kind":"apt","package":"gh","bins":["gh"],"label":"Install GitHub CLI (apt)"}]}}},"isInternal":false,"tokens":355,"sizeBytes":1321},{"name":"SKILL.md","path":"nanobot/skills/memory/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/memory/SKILL.md","title":"memory","category":"anthropic-skill","format":"markdown","content":"---\nname: memory\ndescription: Search past conversations in the agent's history log.\n---\n\n# Memory\n\n## Search Past Events\n\nSearch the exact `History log` path from the system prompt using an available text-search\ntool. This path belongs to the agent workspace, which can differ from the current project.\n\nThe append-only JSONL log stores `cursor`, `timestamp`, and `content` per entry. Retrieve\nentries on demand by topic or date, and inspect neighboring entries when context matters.\n","frontmatter":{"name":"memory","description":"Search past conversations in the agent's history log."},"isInternal":false,"tokens":100,"sizeBytes":484},{"name":"examples.md","path":"nanobot/skills/my/references/examples.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/my/references/examples.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# My Tool — Practical Examples\n\nConcrete scenarios showing when and how to use the my tool effectively.\n\n## Diagnosis\n\n### \"Why can't you search the web?\"\n```\n→ my(action=\"check\", key=\"web_config.enable\")\n  → False\n→ \"Web search is disabled. Add web.enable: true to your config to enable it.\"\n```\n\n### \"Why did you stop?\"\n```\n→ my(action=\"check\", key=\"max_iterations\")\n  → 40\n→ \"I hit the iteration limit (40). The task was complex. I can ask the user if they want to increase it.\"\n```\n\n### \"What model are you running?\"\n```\n→ my(action=\"check\", key=\"model\")\n  → 'anthropic/claude-sonnet-4-6'\n→ my(action=\"check\", key=\"model_preset\")\n  → 'deep'\n```\n\n## Adaptive Behavior\n\n### Large codebase analysis\n```\n→ my(action=\"check\")\n  → context_window_tokens: 200000\n→ my(action=\"set\", key=\"model_preset\", value=\"deep\")\n  → \"Set model_preset = 'deep' for the next turn; context_window_tokens will be 262144\"\n→ \"I've selected the configured deep preset for this session's next turn.\"\n```\n\n### Switching to a configured model preset\n```\n→ my(action=\"set\", key=\"model_preset\", value=\"fast\")\n  → \"Set model_preset = 'fast' for the next turn; model will be 'openai/gpt-4.1-mini'\"\n→ \"Selected the fast preset for this session's next turn.\"\n```\n\n## Cross-Turn Memory\n\n### Remembering user preferences\n```\n# Turn 1: user says \"keep it brief\"\n→ my(action=\"set\", key=\"user_style\", value=\"concise\")\n  → \"Set scratchpad.user_style = 'concise'\"\n\n# Turn 3: new topic\n→ my(action=\"check\", key=\"user_style\")\n  → 'concise'\n  (adjusts response style accordingly)\n```\n\n### Tracking project context\n```\n→ my(action=\"set\", key=\"active_branch\", value=\"feat/auth\")\n→ my(action=\"set\", key=\"test_framework\", value=\"pytest\")\n→ my(action=\"set\", key=\"has_docker\", value=true)\n```\n","isInternal":false,"tokens":486,"sizeBytes":1796},{"name":"SKILL.md","path":"nanobot/skills/my/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/my/SKILL.md","title":"my","category":"anthropic-skill","format":"markdown","content":"---\nname: my\ndescription: Inspect or troubleshoot the agent's runtime state, adjust runtime settings, or keep temporary session notes.\n---\n\n# Self-Awareness\n\n## How to use\n\n1. **Identify the situation** from the categories below\n2. **Call the my tool** with the appropriate action\n3. **If set**, warn the user before changing impactful settings such as the model or runtime limits\n4. **For detailed examples**, read [references/examples.md](references/examples.md)\n\n## When to check\n\n<rule>\n**Diagnose before explaining.** When something doesn't work, check your state first.\n</rule>\n\n<rule>\n**Check budget before complex tasks.** Know your limits before committing.\n</rule>\n\n<rule>\n**Recall across turns.** Store preferences in your scratchpad, read them back later.\n</rule>\n\n## When to set\n\n<rule>\n**Only set when benefit is clear and user is informed.** Warn before changing model.\n</rule>\n\n| Situation | Command |\n|-----------|---------|\n| Check capacity for a large task | `my(action=\"check\", key=\"context_window_tokens\")` |\n| Switch model or context capacity | `my(action=\"set\", key=\"model_preset\", value=\"<preset-name>\")` |\n| Long multi-step task | `my(action=\"set\", key=\"max_iterations\", value=80)` |\n\n**Tradeoff:** Bias toward stability. Only set when defaults are genuinely insufficient.\n\n## Anti-patterns\n\n<rule>\n**Don't check every turn.** Costs a tool call. Use when you need information, not reflexively.\n</rule>\n\n<rule>\n**Don't store sensitive data.** No API keys, passwords, or tokens in scratchpad.\n</rule>\n\n<rule>\n**Don't set workspace.** Does not update file tool boundaries — won't work.\n</rule>\n\n## Constraints\n\n- `model_preset` is saved for the current session; other modifications are in-memory only\n- Direct `model` and `context_window_tokens` writes are rejected during active sessions because they would change the shared instance default. Use a configured `model_preset` instead.\n- Protected params have type/range validation: `max_iterations` (1–100), `context_window_tokens` (4096–1M), `model` (non-empty str)\n- If `tools.my.allow_set` is false, check only\n\n## Related tools\n\n| Need | Use | Persists? |\n|------|-----|-----------|\n| Per-session temp state | `my(action=\"set\", key=\"...\", value=...)` | No |\n| Long-term facts | Memory skill (`MEMORY.md`, `USER.md`) | Yes |\n| Permanent config change | Edit config file | Yes |\n\n**Rule of thumb:** Tomorrow? Memory. This turn only? My.\n","frontmatter":{"name":"my","description":"Inspect or troubleshoot the agent's runtime state, adjust runtime settings, or keep temporary session notes."},"isInternal":false,"tokens":585,"sizeBytes":2417},{"name":"README.md","path":"nanobot/skills/README.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/README.md","title":"Skills Skill","category":"anthropic-skill","format":"markdown","content":"# nanobot Skills\n\nThis directory contains built-in skills that extend nanobot's capabilities.\n\n## Skill Format\n\nEach skill is a directory containing a `SKILL.md` file with:\n- YAML frontmatter (name, description, metadata)\n- Markdown instructions for the agent\n\nWhen skills reference large local documentation or logs, prefer nanobot's built-in `grep` tool to narrow the search space before loading full files. Use `grep(output_mode=\"count\")` / `files_with_matches` for broad searches first, use `head_limit` / `offset` to page through large result sets, and `grep(glob=\"*.md\")` to filter by file name pattern.\n\n## Attribution\n\nThese skills are adapted from [OpenClaw](https://github.com/openclaw/openclaw)'s skill system. The skill format and metadata structure follow OpenClaw's conventions to maintain compatibility.\n\n## Available Skills\n\n| Skill | Description |\n|-------|-------------|\n| `github` | Interact with GitHub using the `gh` CLI |\n| `weather` | Get weather info using wttr.in and Open-Meteo |\n| `summarize` | Summarize URLs, files, and YouTube videos |\n| `tmux` | Remote-control tmux sessions |\n| `clawhub` | Search and install skills from ClawHub registry |\n| `skill-creator` | Create new skills |\n| `nanobot-document` | Explain nanobot usage, configuration, and troubleshooting from bundled docs |\n\n`nanobot-document/references/` is generated from the root `docs/` directory by the Hatch build hook for wheels, source distributions, and editable installs. Edit `docs/` rather than the generated copies; rerun the build or editable install to refresh them. Source distributions also include `docs/` so wheels built from them retain the same documentation.\n","isInternal":false,"tokens":379,"sizeBytes":1670},{"name":"SKILL.md","path":"nanobot/skills/skill-creator/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/skill-creator/SKILL.md","title":"skill-creator","category":"anthropic-skill","format":"markdown","content":"---\nname: skill-creator\ndescription: Create, update, or package agent skills.\n---\n\n# Skill Creator\n\nThis skill provides guidance for creating effective skills.\n\n## About Skills\n\nSkills are modular, self-contained packages that extend the agent's capabilities by providing\nspecialized knowledge, workflows, and tools. Think of them as \"onboarding guides\" for specific\ndomains or tasks—they transform the agent from a general-purpose agent into a specialized agent\nequipped with procedural knowledge that no model can fully possess.\n\n### What Skills Provide\n\n1. Specialized workflows - Multi-step procedures for specific domains\n2. Tool integrations - Instructions for working with specific file formats or APIs\n3. Domain expertise - Company-specific knowledge, schemas, business logic\n4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks\n\n## Core Principles\n\n### Concise is Key\n\nThe context window is a public good. Skills share the context window with everything else the agent needs: system prompt, conversation history, other Skills' metadata, and the actual user request.\n\n**Default assumption: the agent is already very smart.** Only add context the agent doesn't already have. Challenge each piece of information: \"Does the agent really need this explanation?\" and \"Does this paragraph justify its token cost?\"\n\nPrefer concise examples over verbose explanations.\n\n### Set Appropriate Degrees of Freedom\n\nMatch the level of specificity to the task's fragility and variability:\n\n**High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.\n\n**Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.\n\n**Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.\n\nThink of the agent as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).\n\n### Anatomy of a Skill\n\nEvery skill consists of a required SKILL.md file and optional bundled resources:\n\n```\nskill-name/\n├── SKILL.md (required)\n│   ├── YAML frontmatter metadata (required)\n│   │   ├── name: (required)\n│   │   └── description: (required)\n│   └── Markdown instructions (required)\n└── Bundled Resources (optional)\n    ├── scripts/          - Executable code (Python/Bash/etc.)\n    ├── references/       - Documentation intended to be loaded into context as needed\n    └── assets/           - Files used in output (templates, icons, fonts, etc.)\n```\n\n#### SKILL.md (required)\n\nEvery SKILL.md consists of:\n\n- **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that the agent reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.\n- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).\n\n#### Bundled Resources (optional)\n\n##### Scripts (`scripts/`)\n\nExecutable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.\n\n- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed\n- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks\n- **Benefits**: Token efficient, deterministic, may be executed without loading into context\n- **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments\n\n##### References (`references/`)\n\nDocumentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking.\n\n- **When to include**: For documentation that the agent should reference while working\n- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications\n- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides\n- **Benefits**: Keeps SKILL.md lean, loaded only when the agent determines it's needed\n- **Best practice**: If files are large (>10k words), include grep patterns in SKILL.md so the agent can use built-in search tools efficiently; mention when the default `grep(output_mode=\"files_with_matches\")`, `grep(output_mode=\"count\")`, `grep(fixed_strings=true)`, or pagination via `head_limit` / `offset` is the right first step\n- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.\n\n##### Assets (`assets/`)\n\nFiles not intended to be loaded into context, but rather used within the output the agent produces.\n\n- **When to include**: When the skill needs files that will be used in the final output\n- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography\n- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified\n- **Benefits**: Separates output resources from documentation, enables the agent to use files without loading them into context\n\n#### What to Not Include in a Skill\n\nA skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:\n\n- README.md\n- INSTALLATION_GUIDE.md\n- QUICK_REFERENCE.md\n- CHANGELOG.md\n- etc.\n\nThe skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.\n\n### Progressive Disclosure Design Principle\n\nSkills use a three-level loading system to manage context efficiently:\n\n1. **Metadata (name + description)** - Always in context (~100 words)\n2. **SKILL.md body** - When skill triggers (<5k words)\n3. **Bundled resources** - As needed by the agent (Unlimited because scripts can be executed without reading into context window)\n\n#### Progressive Disclosure Patterns\n\nKeep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.\n\n**Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.\n\n**Pattern 1: High-level guide with references**\n\n```markdown\n# PDF Processing\n\n## Quick start\n\nExtract text with pdfplumber:\n[code example]\n\n## Advanced features\n\n- **Form filling**: See [FORMS.md](FORMS.md) for complete guide\n- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods\n- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns\n```\n\nthe agent loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.\n\n**Pattern 2: Domain-specific organization**\n\nFor Skills with multiple domains, organize content by domain to avoid loading irrelevant context:\n\n```\nbigquery-skill/\n├── SKILL.md (overview and navigation)\n└── reference/\n    ├── finance.md (revenue, billing metrics)\n    ├── sales.md (opportunities, pipeline)\n    ├── product.md (API usage, features)\n    └── marketing.md (campaigns, attribution)\n```\n\nWhen a user asks about sales metrics, the agent only reads sales.md.\n\nSimilarly, for skills supporting multiple frameworks or variants, organize by variant:\n\n```\ncloud-deploy/\n├── SKILL.md (workflow + provider selection)\n└── references/\n    ├── aws.md (AWS deployment patterns)\n    ├── gcp.md (GCP deployment patterns)\n    └── azure.md (Azure deployment patterns)\n```\n\nWhen the user chooses AWS, the agent only reads aws.md.\n\n**Pattern 3: Conditional details**\n\nShow basic content, link to advanced content:\n\n```markdown\n# DOCX Processing\n\n## Creating documents\n\nUse docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).\n\n## Editing documents\n\nFor simple edits, modify the XML directly.\n\n**For tracked changes**: See [REDLINING.md](REDLINING.md)\n**For OOXML details**: See [OOXML.md](OOXML.md)\n```\n\nthe agent reads REDLINING.md or OOXML.md only when the user needs those features.\n\n**Important guidelines:**\n\n- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.\n- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so the agent can see the full scope when previewing.\n\n## Skill Creation Process\n\nSkill creation involves these steps:\n\n1. Understand the skill with concrete examples\n2. Plan reusable skill contents (scripts, references, assets)\n3. Initialize the skill (run init_skill.py)\n4. Edit the skill (implement resources and write SKILL.md)\n5. Package the skill (run package_skill.py)\n6. Iterate based on real usage\n\nFollow these steps in order, skipping only if there is a clear reason why they are not applicable.\n\n### Skill Naming\n\n- Use lowercase letters, digits, and hyphens only; normalize user-provided titles to hyphen-case (e.g., \"Plan Mode\" -> `plan-mode`).\n- When generating names, generate a name under 64 characters (letters, digits, hyphens).\n- Prefer short, verb-led phrases that describe the action.\n- Namespace by tool when it improves clarity or triggering (e.g., `gh-address-comments`, `linear-address-issue`).\n- Name the skill folder exactly after the skill name.\n\n### Step 1: Understanding the Skill with Concrete Examples\n\nSkip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.\n\nTo create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.\n\nFor example, when building an image-editor skill, relevant questions include:\n\n- \"What functionality should the image-editor skill support? Editing, rotating, anything else?\"\n- \"Can you give some examples of how this skill would be used?\"\n- \"I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?\"\n- \"What would a user say that should trigger this skill?\"\n\nTo avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.\n\nConclude this step when there is a clear sense of the functionality the skill should support.\n\n### Step 2: Planning the Reusable Skill Contents\n\nTo turn concrete examples into an effective skill, analyze each example by:\n\n1. Considering how to execute on the example from scratch\n2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly\n\nExample: When building a `pdf-editor` skill to handle queries like \"Help me rotate this PDF,\" the analysis shows:\n\n1. Rotating a PDF requires re-writing the same code each time\n2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill\n\nExample: When designing a `frontend-webapp-builder` skill for queries like \"Build me a todo app\" or \"Build me a dashboard to track my steps,\" the analysis shows:\n\n1. Writing a frontend webapp requires the same boilerplate HTML/React each time\n2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill\n\nExample: When building a `big-query` skill to handle queries like \"How many users have logged in today?\" the analysis shows:\n\n1. Querying BigQuery requires re-discovering the table schemas and relationships each time\n2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill\n\nTo establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.\n\n### Step 3: Initializing the Skill\n\nAt this point, it is time to actually create the skill.\n\nSkip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.\n\nWhen creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.\n\nFor `nanobot`, custom skills should live under the active workspace `skills/` directory so they can be discovered automatically at runtime (for example, `<workspace>/skills/my-skill/SKILL.md`).\n\nUsage:\n\n```bash\nscripts/init_skill.py <skill-name> --path <output-directory> [--resources scripts,references,assets] [--examples]\n```\n\nExamples:\n\n```bash\nscripts/init_skill.py my-skill --path ./workspace/skills\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts,references\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts --examples\n```\n\nThe script:\n\n- Creates the skill directory at the specified path\n- Generates a SKILL.md template with proper frontmatter and TODO placeholders\n- Optionally creates resource directories based on `--resources`\n- Optionally adds example files when `--examples` is set\n\nAfter initialization, customize the SKILL.md and add resources as needed. If you used `--examples`, replace or delete placeholder files.\n\n### Step 4: Edit the Skill\n\nWhen editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of the agent to use. Include information that would be beneficial and non-obvious to the agent. Consider what procedural knowledge, domain-specific details, or reusable assets would help another agent instance execute these tasks more effectively.\n\n#### Learn Proven Design Patterns\n\nConsult these helpful guides based on your skill's needs:\n\n- **Multi-step processes**: See references/workflows.md for sequential workflows and conditional logic\n- **Specific output formats or quality standards**: See references/output-patterns.md for template and example patterns\n\nThese files contain established best practices for effective skill design.\n\n#### Start with Reusable Skill Contents\n\nTo begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.\n\nAdded scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.\n\nIf you used `--examples`, delete any placeholder files that are not needed for the skill. Only create resource directories that are actually required.\n\n#### Update SKILL.md\n\n**Writing Guidelines:** Always use imperative/infinitive form.\n\n##### Frontmatter\n\nWrite the YAML frontmatter with `name` and `description`:\n\n- `name`: The skill name\n- `description`: This is the primary triggering mechanism for your skill, and helps the agent understand when to use the skill.\n  - Include both what the Skill does and specific triggers/contexts for when to use it.\n  - Include all \"when to use\" information here - Not in the body. The body is only loaded after triggering, so \"When to Use This Skill\" sections in the body are not helpful to the agent.\n  - Example description for a `docx` skill: \"Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when the agent needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks\"\n\nKeep frontmatter minimal. In `nanobot`, `metadata` and `always` are also supported when needed, but avoid adding extra fields unless they are actually required.\n\n##### Body\n\nWrite instructions for using the skill and its bundled resources.\n\n### Step 5: Packaging a Skill\n\nOnce development of the skill is complete, it must be packaged into a distributable .skill file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder>\n```\n\nOptional output directory specification:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder> ./dist\n```\n\nThe packaging script will:\n\n1. **Validate** the skill automatically, checking:\n   - YAML frontmatter format and required fields\n   - Skill naming conventions and directory structure\n   - Description completeness and quality\n   - File organization and resource references\n\n2. **Package** the skill if validation passes, creating a .skill file named after the skill (e.g., `my-skill.skill`) that includes all files and maintains the proper directory structure for distribution. The .skill file is a zip file with a .skill extension.\n\n   Security restriction: symlinks are rejected and packaging fails when any symlink is present.\n\nIf validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.\n\n### Step 6: Iterate\n\nAfter testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.\n\n**Iteration workflow:**\n\n1. Use the skill on real tasks\n2. Notice struggles or inefficiencies\n3. Identify how SKILL.md or bundled resources should be updated\n4. Implement changes and test again\n","frontmatter":{"name":"skill-creator","description":"Create, update, or package agent skills."},"isInternal":false,"tokens":3931,"sizeBytes":19029},{"name":"SKILL.md","path":"nanobot/skills/summarize/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/summarize/SKILL.md","title":"summarize","category":"anthropic-skill","format":"markdown","content":"---\nname: summarize\ndescription: Summarize or extract text and transcripts from URLs, YouTube videos, podcasts, and local files.\nhomepage: https://summarize.sh\nmetadata: {\"nanobot\":{\"emoji\":\"🧾\",\"requires\":{\"bins\":[\"summarize\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"steipete/tap/summarize\",\"bins\":[\"summarize\"],\"label\":\"Install summarize (brew)\"}]}}\n---\n\n# Summarize\n\nFast CLI to summarize URLs, local files, and YouTube links.\n\n## When to use (trigger phrases)\n\nUse this skill immediately when the user asks any of:\n- “use summarize.sh”\n- “what’s this link/video about?”\n- “summarize this URL/article”\n- “transcribe this YouTube/video” (best-effort transcript extraction; no `yt-dlp` needed)\n\n## Quick start\n\n```bash\nsummarize \"https://example.com\" --model google/gemini-3-flash-preview\nsummarize \"/path/to/file.pdf\" --model google/gemini-3-flash-preview\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto\n```\n\n## YouTube: summary vs transcript\n\nBest-effort transcript (URLs only):\n\n```bash\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto --extract-only\n```\n\nIf the user asked for a transcript but it’s huge, return a tight summary first, then ask which section/time range to expand.\n\n## Model + keys\n\nSet the API key for your chosen provider:\n- OpenAI: `OPENAI_API_KEY`\n- Anthropic: `ANTHROPIC_API_KEY`\n- xAI: `XAI_API_KEY`\n- Google: `GEMINI_API_KEY` (aliases: `GOOGLE_GENERATIVE_AI_API_KEY`, `GOOGLE_API_KEY`)\n\nDefault model is `google/gemini-3-flash-preview` if none is set.\n\n## Useful flags\n\n- `--length short|medium|long|xl|xxl|<chars>`\n- `--max-output-tokens <count>`\n- `--extract-only` (URLs only)\n- `--json` (machine readable)\n- `--firecrawl auto|off|always` (fallback extraction)\n- `--youtube auto` (Apify fallback if `APIFY_API_TOKEN` set)\n\n## Config\n\nOptional config file: `~/.summarize/config.json`\n\n```json\n{ \"model\": \"openai/gpt-5.2\" }\n```\n\nOptional services:\n- `FIRECRAWL_API_KEY` for blocked sites\n- `APIFY_API_TOKEN` for YouTube fallback\n","frontmatter":{"name":"summarize","description":"Summarize or extract text and transcripts from URLs, YouTube videos, podcasts, and local files.","homepage":"https://summarize.sh","metadata":{"nanobot":{"emoji":"🧾","requires":{"bins":["summarize"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/summarize","bins":["summarize"],"label":"Install summarize (brew)"}]}}},"isInternal":false,"tokens":572,"sizeBytes":2003},{"name":"SKILL.md","path":"nanobot/skills/tmux/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/tmux/SKILL.md","title":"tmux","category":"anthropic-skill","format":"markdown","content":"---\nname: tmux\ndescription: Use when a CLI task needs an interactive terminal or control of a tmux session.\nmetadata: {\"nanobot\":{\"emoji\":\"🧵\",\"os\":[\"darwin\",\"linux\"],\"requires\":{\"bins\":[\"tmux\"]}}}\n---\n\n# tmux Skill\n\nUse tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.\n\n## Quickstart (isolated socket, exec tool)\n\n```bash\nSOCKET_DIR=\"${NANOBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/nanobot-tmux-sockets}\"\nmkdir -p \"$SOCKET_DIR\"\nSOCKET=\"$SOCKET_DIR/nanobot.sock\"\nSESSION=nanobot-python\n\ntmux -S \"$SOCKET\" new -d -s \"$SESSION\" -n shell\ntmux -S \"$SOCKET\" send-keys -t \"$SESSION\":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter\ntmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\nAfter starting a session, always print monitor commands:\n\n```\nTo monitor:\n  tmux -S \"$SOCKET\" attach -t \"$SESSION\"\n  tmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\n## Socket convention\n\n- Use `NANOBOT_TMUX_SOCKET_DIR` environment variable.\n- Default socket path: `\"$NANOBOT_TMUX_SOCKET_DIR/nanobot.sock\"`.\n\n## Targeting panes and naming\n\n- Target format: `session:window.pane` (defaults to `:0.0`).\n- Keep names short; avoid spaces.\n- Inspect: `tmux -S \"$SOCKET\" list-sessions`, `tmux -S \"$SOCKET\" list-panes -a`.\n\n## Finding sessions\n\n- List sessions on your socket: `{baseDir}/scripts/find-sessions.sh -S \"$SOCKET\"`.\n- Scan all sockets: `{baseDir}/scripts/find-sessions.sh --all` (uses `NANOBOT_TMUX_SOCKET_DIR`).\n\n## Sending input safely\n\n- Prefer literal sends: `tmux -S \"$SOCKET\" send-keys -t target -l -- \"$cmd\"`.\n- Control keys: `tmux -S \"$SOCKET\" send-keys -t target C-c`.\n\n## Watching output\n\n- Capture recent history: `tmux -S \"$SOCKET\" capture-pane -p -J -t target -S -200`.\n- Wait for prompts: `{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern'`.\n- Attaching is OK; detach with `Ctrl+b d`.\n\n## Spawning processes\n\n- For python REPLs, set `PYTHON_BASIC_REPL=1` (non-basic REPL breaks send-keys flows).\n\n## Windows / WSL\n\n- tmux is supported on macOS/Linux. On Windows, use WSL and install tmux inside WSL.\n- This skill is gated to `darwin`/`linux` and requires `tmux` on PATH.\n\n## Orchestrating Coding Agents (Codex, Claude Code)\n\ntmux excels at running multiple coding agents in parallel:\n\n```bash\nSOCKET=\"${TMPDIR:-/tmp}/codex-army.sock\"\n\n# Create multiple sessions\nfor i in 1 2 3 4 5; do\n  tmux -S \"$SOCKET\" new-session -d -s \"agent-$i\"\ndone\n\n# Launch agents in different workdirs\ntmux -S \"$SOCKET\" send-keys -t agent-1 \"cd /tmp/project1 && codex --yolo 'Fix bug X'\" Enter\ntmux -S \"$SOCKET\" send-keys -t agent-2 \"cd /tmp/project2 && codex --yolo 'Fix bug Y'\" Enter\n\n# Poll for completion (check if prompt returned)\nfor sess in agent-1 agent-2; do\n  if tmux -S \"$SOCKET\" capture-pane -p -t \"$sess\" -S -3 | grep -q \"❯\"; then\n    echo \"$sess: DONE\"\n  else\n    echo \"$sess: Running...\"\n  fi\ndone\n\n# Get full output from completed session\ntmux -S \"$SOCKET\" capture-pane -p -t agent-1 -S -500\n```\n\n**Tips:**\n- Use separate git worktrees for parallel fixes (no branch conflicts)\n- `pnpm install` first before running codex in fresh clones\n- Check for shell prompt (`❯` or `$`) to detect completion\n- Codex needs `--yolo` or `--full-auto` for non-interactive fixes\n\n## Cleanup\n\n- Kill a session: `tmux -S \"$SOCKET\" kill-session -t \"$SESSION\"`.\n- Kill all sessions on a socket: `tmux -S \"$SOCKET\" list-sessions -F '#{session_name}' | xargs -r -n1 tmux -S \"$SOCKET\" kill-session -t`.\n- Remove everything on the private socket: `tmux -S \"$SOCKET\" kill-server`.\n\n## Helper: wait-for-text.sh\n\n`{baseDir}/scripts/wait-for-text.sh` polls a pane for a regex (or fixed string) with a timeout.\n\n```bash\n{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]\n```\n\n- `-t`/`--target` pane target (required)\n- `-p`/`--pattern` regex to match (required); add `-F` for fixed string\n- `-T` timeout seconds (integer, default 15)\n- `-i` poll interval seconds (default 0.5)\n- `-l` history lines to search (integer, default 1000)\n","frontmatter":{"name":"tmux","description":"Use when a CLI task needs an interactive terminal or control of a tmux session.","metadata":{"nanobot":{"emoji":"🧵","os":["darwin","linux"],"requires":{"bins":["tmux"]}}}},"isInternal":false,"tokens":1256,"sizeBytes":4045},{"name":"SKILL.md","path":"nanobot/skills/weather/SKILL.md","rawUrl":"https://raw.githubusercontent.com/HKUDS/nanobot/HEAD/nanobot/skills/weather/SKILL.md","title":"weather","category":"anthropic-skill","format":"markdown","content":"---\nname: weather\ndescription: Get current weather and forecasts.\nhomepage: https://wttr.in/:help\nmetadata: {\"nanobot\":{\"emoji\":\"🌤️\",\"requires\":{\"bins\":[\"curl\"]}}}\n---\n\n# Weather\n\nTwo free services, no API keys needed.\n\n## wttr.in (primary)\n\nChoose one request that matches the user's scope. Do not fetch current\nconditions separately when a today or forecast request already includes them.\n\nPlatform notes:\n- On Windows PowerShell, use `curl.exe`; bare `curl` may resolve to\n  `Invoke-WebRequest`.\n- On macOS and Linux, use `curl`.\n\nCurrent conditions only:\n```bash\ncurl -s \"https://wttr.in/London?format=3\"\n# Output: London: ⛅️ +8°C\n```\n\nCustom current conditions format:\n```bash\ncurl -s \"https://wttr.in/London?format=%l:+%c+%t+%h+%w\"\n# Output: London: ⛅️ +8°C 71% ↙5km/h\n```\n\nToday's weather, including current conditions (use this single request for\nquestions about today's weather):\n```bash\ncurl -s \"https://wttr.in/London?1&m\"\n```\n\nFull forecast:\n```bash\ncurl -s \"https://wttr.in/London?T&m\"\n```\n\nOn Windows PowerShell, replace `curl` with `curl.exe` in the commands above.\n\nFormat codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon\n\nTips:\n- URL-encode spaces: `wttr.in/New+York`\n- Airport codes: `wttr.in/JFK`\n- Units: `?m` (metric) `?u` (USCS)\n- Today only: `?1` · Current only: `?0`\n- PNG (macOS/Linux): `curl -s \"https://wttr.in/Berlin.png\" -o weather.png`\n- PNG (Windows PowerShell): `curl.exe -s \"https://wttr.in/Berlin.png\" -o weather.png`\n\n## Open-Meteo (fallback, JSON)\n\nFree, no key, good for programmatic use:\n```bash\ncurl -s \"https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true\"\n```\n\nFind coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.\n\nDocs: https://open-meteo.com/en/docs\n","frontmatter":{"name":"weather","description":"Get current weather and forecasts.","homepage":"https://wttr.in/:help","metadata":{"nanobot":{"emoji":"🌤️","requires":{"bins":["curl"]}}}},"isInternal":false,"tokens":542,"sizeBytes":1830}],"systemPromptSnippet":"<yakaai_skills repo=\"HKUDS/nanobot\">\n<!-- File: nanobot/skills/clawhub/SKILL.md (Tokens: ~350 | Category: anthropic-skill) -->\n---\nname: clawhub\ndescription: Search and install agent skills from ClawHub, the public skill registry.\nhomepage: https://clawhub.ai\nmetadata: {\"nanobot\":{\"emoji\":\"🦞\"}}\n---\n\n# ClawHub\n\nPublic skill registry for AI agents. Search by natural language (vector search).\n\n## When to use\n\nUse this skill when the user asks any of:\n- \"find a skill for …\"\n- \"search for skills\"\n- \"install a skill\"\n- \"what skills are available?\"\n- \"update my skills\"\n\n## Search\n\n```bash\nnpx --yes clawhub@latest search \"web scraping\" --limit 5\n```\n\n## Install\n\n```bash\nnpx --yes clawhub@latest install <slug> --workdir ~/.nanobot/workspace\n```\n\nReplace `<slug>` with the skill name from search results. This places the skill into `~/.nanobot/workspace/skills/`, where nanobot loads workspace skills from. Always include `--workdir`.\n\n## Update\n\n```bash\nnpx --yes clawhub@latest update --all --workdir ~/.nanobot/workspace\n```\n\n## List installed\n\n```bash\nnpx --yes clawhub@latest list --workdir ~/.nanobot/workspace\n```\n\n## Notes\n\n- Requires Node.js (`npx` comes with it).\n- No API key needed for search and install.\n- Login (`npx --yes clawhub@latest login`) is only required for publishing.\n- `--workdir ~/.nanobot/workspace` is critical — without it, skills install to the current directory instead of the nanobot workspace.\n- After install, remind the user to start a new session to load the skill.\n\n<!-- File: nanobot/skills/cron/SKILL.md (Tokens: ~646 | Category: anthropic-skill) -->\n---\nname: cron\ndescription: Schedule reminders and recurring tasks.\n---\n\n# Cron\n\nUse the `cron` tool to schedule reminders or recurring tasks. New tasks run in the current chat. nanobot sends the agent's final reply to that chat. The user can change the task's chat in WebUI.\n\nWrite what to do in `message`. For a normal reminder or report, do not copy the current channel, chat ID, or instructions to call the `message` tool into the task. For example, use \"Remind me to drink water\", not \"Call message to send to this chat\".\n\nIf the user asks to send to other chats, preserve those recipients in the task instructions. Use the `message` tool for those sends and for file attachments. Existing tasks that explicitly request a `message` call still use it; changing the task's chat does not change explicit recipients in its instructions.\n\nChoose by timing and notification behavior, not repetition. A specified time or interval uses `cron`, even when it repeats: \"every day at 8am, remind me to drink water\" is a cron task. Use `HEARTBEAT.md` for background checks with flexible timing that should notify only on actionable changes. Heartbeat does not guarantee a requested time or interval; do not substitute it for an explicit schedule.\n\n## Task Types\n\n1. **Reminder** - the agent replies with the reminder when the task runs\n2. **Task** - the agent follows the instructions and replies with the result\n3. **One-time** - runs once at a specific time, then auto-deletes\n\n## Examples\n\nFixed reminder:\n```\ncron(action=\"add\", message=\"Time to take a break!\", every_seconds=1200)\n```\n\nDynamic task (agent executes each time):\n```\ncron(action=\"add\", message=\"Check HKUDS/nanobot GitHub stars and report\", every_seconds=600)\n```\n\nOne-time scheduled task (compute ISO datetime from current time):\n```\ncron(action=\"add\", message=\"Remind me about the meeting\", at=\"<ISO datetime>\")\n```\n\nTimezone-aware cron:\n```\ncron(action=\"add\", message=\"Morning standup\", cron_expr=\"0 9 * * 1-5\", tz=\"America/Vancouver\")\n```\n\nList/remove:\n```\ncron(action=\"list\")\ncron(action=\"remove\", job_id=\"abc123\")\n```\n\n## Time Expressions\n\n| User says | Parameters |\n|-----------|------------|\n| every 20 minutes | every_seconds: 1200 |\n| every hour | every_seconds: 3600 |\n| every day at 8am | cron_expr: \"0 8 * * *\" |\n| weekdays at 5pm | cron_expr: \"0 17 * * 1-5\" |\n| 9am Vancouver time daily | cron_expr: \"0 9 * * *\", tz: \"America/Vancouver\" |\n| at a specific time | at: ISO datetime string (compute from current time) |\n\n## Timezone\n\nUse `tz` with `cron_expr` to schedule in a specific IANA timezone. Without `tz`, the server's local timezone is used.\n\n<!-- File: nanobot/skills/github/SKILL.md (Tokens: ~355 | Category: anthropic-skill) -->\n---\nname: github\ndescription: \"Manage GitHub issues and pull requests, inspect CI runs, and query repository data.\"\nmetadata: {\"nanobot\":{\"emoji\":\"🐙\",\"requires\":{\"bins\":[\"gh\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (brew)\"},{\"id\":\"apt\",\"kind\":\"apt\",\"package\":\"gh\",\"bins\":[\"gh\"],\"label\":\"Install GitHub CLI (apt)\"}]}}\n---\n\n# GitHub Skill\n\nUse the `gh` CLI to interact with GitHub. Always specify `--repo owner/repo` when not in a git directory, or use URLs directly.\n\n## Pull Requests\n\nCheck CI status on a PR:\n```bash\ngh pr checks 55 --repo owner/repo\n```\n\nList recent workflow runs:\n```bash\ngh run list --repo owner/repo --limit 10\n```\n\nView a run and see which steps failed:\n```bash\ngh run view <run-id> --repo owner/repo\n```\n\nView logs for failed steps only:\n```bash\ngh run view <run-id> --repo owner/repo --log-failed\n```\n\n## API for Advanced Queries\n\nThe `gh api` command is useful for accessing data not available through other subcommands.\n\nGet PR with specific fields:\n```bash\ngh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'\n```\n\n## JSON Output\n\nMost commands support `--json` for structured output.  You can use `--jq` to filter:\n\n```bash\ngh issue list --repo owner/repo --json number,title --jq '.[] | \"\\(.number): \\(.title)\"'\n```\n\n<!-- File: nanobot/skills/memory/SKILL.md (Tokens: ~100 | Category: anthropic-skill) -->\n---\nname: memory\ndescription: Search past conversations in the agent's history log.\n---\n\n# Memory\n\n## Search Past Events\n\nSearch the exact `History log` path from the system prompt using an available text-search\ntool. This path belongs to the agent workspace, which can differ from the current project.\n\nThe append-only JSONL log stores `cursor`, `timestamp`, and `content` per entry. Retrieve\nentries on demand by topic or date, and inspect neighboring entries when context matters.\n\n<!-- File: nanobot/skills/my/references/examples.md (Tokens: ~486 | Category: anthropic-skill) -->\n# My Tool — Practical Examples\n\nConcrete scenarios showing when and how to use the my tool effectively.\n\n## Diagnosis\n\n### \"Why can't you search the web?\"\n```\n→ my(action=\"check\", key=\"web_config.enable\")\n  → False\n→ \"Web search is disabled. Add web.enable: true to your config to enable it.\"\n```\n\n### \"Why did you stop?\"\n```\n→ my(action=\"check\", key=\"max_iterations\")\n  → 40\n→ \"I hit the iteration limit (40). The task was complex. I can ask the user if they want to increase it.\"\n```\n\n### \"What model are you running?\"\n```\n→ my(action=\"check\", key=\"model\")\n  → 'anthropic/claude-sonnet-4-6'\n→ my(action=\"check\", key=\"model_preset\")\n  → 'deep'\n```\n\n## Adaptive Behavior\n\n### Large codebase analysis\n```\n→ my(action=\"check\")\n  → context_window_tokens: 200000\n→ my(action=\"set\", key=\"model_preset\", value=\"deep\")\n  → \"Set model_preset = 'deep' for the next turn; context_window_tokens will be 262144\"\n→ \"I've selected the configured deep preset for this session's next turn.\"\n```\n\n### Switching to a configured model preset\n```\n→ my(action=\"set\", key=\"model_preset\", value=\"fast\")\n  → \"Set model_preset = 'fast' for the next turn; model will be 'openai/gpt-4.1-mini'\"\n→ \"Selected the fast preset for this session's next turn.\"\n```\n\n## Cross-Turn Memory\n\n### Remembering user preferences\n```\n# Turn 1: user says \"keep it brief\"\n→ my(action=\"set\", key=\"user_style\", value=\"concise\")\n  → \"Set scratchpad.user_style = 'concise'\"\n\n# Turn 3: new topic\n→ my(action=\"check\", key=\"user_style\")\n  → 'concise'\n  (adjusts response style accordingly)\n```\n\n### Tracking project context\n```\n→ my(action=\"set\", key=\"active_branch\", value=\"feat/auth\")\n→ my(action=\"set\", key=\"test_framework\", value=\"pytest\")\n→ my(action=\"set\", key=\"has_docker\", value=true)\n```\n\n<!-- File: nanobot/skills/my/SKILL.md (Tokens: ~585 | Category: anthropic-skill) -->\n---\nname: my\ndescription: Inspect or troubleshoot the agent's runtime state, adjust runtime settings, or keep temporary session notes.\n---\n\n# Self-Awareness\n\n## How to use\n\n1. **Identify the situation** from the categories below\n2. **Call the my tool** with the appropriate action\n3. **If set**, warn the user before changing impactful settings such as the model or runtime limits\n4. **For detailed examples**, read [references/examples.md](references/examples.md)\n\n## When to check\n\n<rule>\n**Diagnose before explaining.** When something doesn't work, check your state first.\n</rule>\n\n<rule>\n**Check budget before complex tasks.** Know your limits before committing.\n</rule>\n\n<rule>\n**Recall across turns.** Store preferences in your scratchpad, read them back later.\n</rule>\n\n## When to set\n\n<rule>\n**Only set when benefit is clear and user is informed.** Warn before changing model.\n</rule>\n\n| Situation | Command |\n|-----------|---------|\n| Check capacity for a large task | `my(action=\"check\", key=\"context_window_tokens\")` |\n| Switch model or context capacity | `my(action=\"set\", key=\"model_preset\", value=\"<preset-name>\")` |\n| Long multi-step task | `my(action=\"set\", key=\"max_iterations\", value=80)` |\n\n**Tradeoff:** Bias toward stability. Only set when defaults are genuinely insufficient.\n\n## Anti-patterns\n\n<rule>\n**Don't check every turn.** Costs a tool call. Use when you need information, not reflexively.\n</rule>\n\n<rule>\n**Don't store sensitive data.** No API keys, passwords, or tokens in scratchpad.\n</rule>\n\n<rule>\n**Don't set workspace.** Does not update file tool boundaries — won't work.\n</rule>\n\n## Constraints\n\n- `model_preset` is saved for the current session; other modifications are in-memory only\n- Direct `model` and `context_window_tokens` writes are rejected during active sessions because they would change the shared instance default. Use a configured `model_preset` instead.\n- Protected params have type/range validation: `max_iterations` (1–100), `context_window_tokens` (4096–1M), `model` (non-empty str)\n- If `tools.my.allow_set` is false, check only\n\n## Related tools\n\n| Need | Use | Persists? |\n|------|-----|-----------|\n| Per-session temp state | `my(action=\"set\", key=\"...\", value=...)` | No |\n| Long-term facts | Memory skill (`MEMORY.md`, `USER.md`) | Yes |\n| Permanent config change | Edit config file | Yes |\n\n**Rule of thumb:** Tomorrow? Memory. This turn only? My.\n\n<!-- File: nanobot/skills/README.md (Tokens: ~379 | Category: anthropic-skill) -->\n# nanobot Skills\n\nThis directory contains built-in skills that extend nanobot's capabilities.\n\n## Skill Format\n\nEach skill is a directory containing a `SKILL.md` file with:\n- YAML frontmatter (name, description, metadata)\n- Markdown instructions for the agent\n\nWhen skills reference large local documentation or logs, prefer nanobot's built-in `grep` tool to narrow the search space before loading full files. Use `grep(output_mode=\"count\")` / `files_with_matches` for broad searches first, use `head_limit` / `offset` to page through large result sets, and `grep(glob=\"*.md\")` to filter by file name pattern.\n\n## Attribution\n\nThese skills are adapted from [OpenClaw](https://github.com/openclaw/openclaw)'s skill system. The skill format and metadata structure follow OpenClaw's conventions to maintain compatibility.\n\n## Available Skills\n\n| Skill | Description |\n|-------|-------------|\n| `github` | Interact with GitHub using the `gh` CLI |\n| `weather` | Get weather info using wttr.in and Open-Meteo |\n| `summarize` | Summarize URLs, files, and YouTube videos |\n| `tmux` | Remote-control tmux sessions |\n| `clawhub` | Search and install skills from ClawHub registry |\n| `skill-creator` | Create new skills |\n| `nanobot-document` | Explain nanobot usage, configuration, and troubleshooting from bundled docs |\n\n`nanobot-document/references/` is generated from the root `docs/` directory by the Hatch build hook for wheels, source distributions, and editable installs. Edit `docs/` rather than the generated copies; rerun the build or editable install to refresh them. Source distributions also include `docs/` so wheels built from them retain the same documentation.\n\n<!-- File: nanobot/skills/skill-creator/SKILL.md (Tokens: ~3931 | Category: anthropic-skill) -->\n---\nname: skill-creator\ndescription: Create, update, or package agent skills.\n---\n\n# Skill Creator\n\nThis skill provides guidance for creating effective skills.\n\n## About Skills\n\nSkills are modular, self-contained packages that extend the agent's capabilities by providing\nspecialized knowledge, workflows, and tools. Think of them as \"onboarding guides\" for specific\ndomains or tasks—they transform the agent from a general-purpose agent into a specialized agent\nequipped with procedural knowledge that no model can fully possess.\n\n### What Skills Provide\n\n1. Specialized workflows - Multi-step procedures for specific domains\n2. Tool integrations - Instructions for working with specific file formats or APIs\n3. Domain expertise - Company-specific knowledge, schemas, business logic\n4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks\n\n## Core Principles\n\n### Concise is Key\n\nThe context window is a public good. Skills share the context window with everything else the agent needs: system prompt, conversation history, other Skills' metadata, and the actual user request.\n\n**Default assumption: the agent is already very smart.** Only add context the agent doesn't already have. Challenge each piece of information: \"Does the agent really need this explanation?\" and \"Does this paragraph justify its token cost?\"\n\nPrefer concise examples over verbose explanations.\n\n### Set Appropriate Degrees of Freedom\n\nMatch the level of specificity to the task's fragility and variability:\n\n**High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.\n\n**Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.\n\n**Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.\n\nThink of the agent as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).\n\n### Anatomy of a Skill\n\nEvery skill consists of a required SKILL.md file and optional bundled resources:\n\n```\nskill-name/\n├── SKILL.md (required)\n│   ├── YAML frontmatter metadata (required)\n│   │   ├── name: (required)\n│   │   └── description: (required)\n│   └── Markdown instructions (required)\n└── Bundled Resources (optional)\n    ├── scripts/          - Executable code (Python/Bash/etc.)\n    ├── references/       - Documentation intended to be loaded into context as needed\n    └── assets/           - Files used in output (templates, icons, fonts, etc.)\n```\n\n#### SKILL.md (required)\n\nEvery SKILL.md consists of:\n\n- **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that the agent reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.\n- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).\n\n#### Bundled Resources (optional)\n\n##### Scripts (`scripts/`)\n\nExecutable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.\n\n- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed\n- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks\n- **Benefits**: Token efficient, deterministic, may be executed without loading into context\n- **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments\n\n##### References (`references/`)\n\nDocumentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking.\n\n- **When to include**: For documentation that the agent should reference while working\n- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications\n- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides\n- **Benefits**: Keeps SKILL.md lean, loaded only when the agent determines it's needed\n- **Best practice**: If files are large (>10k words), include grep patterns in SKILL.md so the agent can use built-in search tools efficiently; mention when the default `grep(output_mode=\"files_with_matches\")`, `grep(output_mode=\"count\")`, `grep(fixed_strings=true)`, or pagination via `head_limit` / `offset` is the right first step\n- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.\n\n##### Assets (`assets/`)\n\nFiles not intended to be loaded into context, but rather used within the output the agent produces.\n\n- **When to include**: When the skill needs files that will be used in the final output\n- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography\n- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified\n- **Benefits**: Separates output resources from documentation, enables the agent to use files without loading them into context\n\n#### What to Not Include in a Skill\n\nA skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:\n\n- README.md\n- INSTALLATION_GUIDE.md\n- QUICK_REFERENCE.md\n- CHANGELOG.md\n- etc.\n\nThe skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.\n\n### Progressive Disclosure Design Principle\n\nSkills use a three-level loading system to manage context efficiently:\n\n1. **Metadata (name + description)** - Always in context (~100 words)\n2. **SKILL.md body** - When skill triggers (<5k words)\n3. **Bundled resources** - As needed by the agent (Unlimited because scripts can be executed without reading into context window)\n\n#### Progressive Disclosure Patterns\n\nKeep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.\n\n**Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.\n\n**Pattern 1: High-level guide with references**\n\n```markdown\n# PDF Processing\n\n## Quick start\n\nExtract text with pdfplumber:\n[code example]\n\n## Advanced features\n\n- **Form filling**: See [FORMS.md](FORMS.md) for complete guide\n- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods\n- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns\n```\n\nthe agent loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.\n\n**Pattern 2: Domain-specific organization**\n\nFor Skills with multiple domains, organize content by domain to avoid loading irrelevant context:\n\n```\nbigquery-skill/\n├── SKILL.md (overview and navigation)\n└── reference/\n    ├── finance.md (revenue, billing metrics)\n    ├── sales.md (opportunities, pipeline)\n    ├── product.md (API usage, features)\n    └── marketing.md (campaigns, attribution)\n```\n\nWhen a user asks about sales metrics, the agent only reads sales.md.\n\nSimilarly, for skills supporting multiple frameworks or variants, organize by variant:\n\n```\ncloud-deploy/\n├── SKILL.md (workflow + provider selection)\n└── references/\n    ├── aws.md (AWS deployment patterns)\n    ├── gcp.md (GCP deployment patterns)\n    └── azure.md (Azure deployment patterns)\n```\n\nWhen the user chooses AWS, the agent only reads aws.md.\n\n**Pattern 3: Conditional details**\n\nShow basic content, link to advanced content:\n\n```markdown\n# DOCX Processing\n\n## Creating documents\n\nUse docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).\n\n## Editing documents\n\nFor simple edits, modify the XML directly.\n\n**For tracked changes**: See [REDLINING.md](REDLINING.md)\n**For OOXML details**: See [OOXML.md](OOXML.md)\n```\n\nthe agent reads REDLINING.md or OOXML.md only when the user needs those features.\n\n**Important guidelines:**\n\n- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.\n- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so the agent can see the full scope when previewing.\n\n## Skill Creation Process\n\nSkill creation involves these steps:\n\n1. Understand the skill with concrete examples\n2. Plan reusable skill contents (scripts, references, assets)\n3. Initialize the skill (run init_skill.py)\n4. Edit the skill (implement resources and write SKILL.md)\n5. Package the skill (run package_skill.py)\n6. Iterate based on real usage\n\nFollow these steps in order, skipping only if there is a clear reason why they are not applicable.\n\n### Skill Naming\n\n- Use lowercase letters, digits, and hyphens only; normalize user-provided titles to hyphen-case (e.g., \"Plan Mode\" -> `plan-mode`).\n- When generating names, generate a name under 64 characters (letters, digits, hyphens).\n- Prefer short, verb-led phrases that describe the action.\n- Namespace by tool when it improves clarity or triggering (e.g., `gh-address-comments`, `linear-address-issue`).\n- Name the skill folder exactly after the skill name.\n\n### Step 1: Understanding the Skill with Concrete Examples\n\nSkip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.\n\nTo create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.\n\nFor example, when building an image-editor skill, relevant questions include:\n\n- \"What functionality should the image-editor skill support? Editing, rotating, anything else?\"\n- \"Can you give some examples of how this skill would be used?\"\n- \"I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?\"\n- \"What would a user say that should trigger this skill?\"\n\nTo avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.\n\nConclude this step when there is a clear sense of the functionality the skill should support.\n\n### Step 2: Planning the Reusable Skill Contents\n\nTo turn concrete examples into an effective skill, analyze each example by:\n\n1. Considering how to execute on the example from scratch\n2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly\n\nExample: When building a `pdf-editor` skill to handle queries like \"Help me rotate this PDF,\" the analysis shows:\n\n1. Rotating a PDF requires re-writing the same code each time\n2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill\n\nExample: When designing a `frontend-webapp-builder` skill for queries like \"Build me a todo app\" or \"Build me a dashboard to track my steps,\" the analysis shows:\n\n1. Writing a frontend webapp requires the same boilerplate HTML/React each time\n2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill\n\nExample: When building a `big-query` skill to handle queries like \"How many users have logged in today?\" the analysis shows:\n\n1. Querying BigQuery requires re-discovering the table schemas and relationships each time\n2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill\n\nTo establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.\n\n### Step 3: Initializing the Skill\n\nAt this point, it is time to actually create the skill.\n\nSkip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.\n\nWhen creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.\n\nFor `nanobot`, custom skills should live under the active workspace `skills/` directory so they can be discovered automatically at runtime (for example, `<workspace>/skills/my-skill/SKILL.md`).\n\nUsage:\n\n```bash\nscripts/init_skill.py <skill-name> --path <output-directory> [--resources scripts,references,assets] [--examples]\n```\n\nExamples:\n\n```bash\nscripts/init_skill.py my-skill --path ./workspace/skills\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts,references\nscripts/init_skill.py my-skill --path ./workspace/skills --resources scripts --examples\n```\n\nThe script:\n\n- Creates the skill directory at the specified path\n- Generates a SKILL.md template with proper frontmatter and TODO placeholders\n- Optionally creates resource directories based on `--resources`\n- Optionally adds example files when `--examples` is set\n\nAfter initialization, customize the SKILL.md and add resources as needed. If you used `--examples`, replace or delete placeholder files.\n\n### Step 4: Edit the Skill\n\nWhen editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of the agent to use. Include information that would be beneficial and non-obvious to the agent. Consider what procedural knowledge, domain-specific details, or reusable assets would help another agent instance execute these tasks more effectively.\n\n#### Learn Proven Design Patterns\n\nConsult these helpful guides based on your skill's needs:\n\n- **Multi-step processes**: See references/workflows.md for sequential workflows and conditional logic\n- **Specific output formats or quality standards**: See references/output-patterns.md for template and example patterns\n\nThese files contain established best practices for effective skill design.\n\n#### Start with Reusable Skill Contents\n\nTo begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.\n\nAdded scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.\n\nIf you used `--examples`, delete any placeholder files that are not needed for the skill. Only create resource directories that are actually required.\n\n#### Update SKILL.md\n\n**Writing Guidelines:** Always use imperative/infinitive form.\n\n##### Frontmatter\n\nWrite the YAML frontmatter with `name` and `description`:\n\n- `name`: The skill name\n- `description`: This is the primary triggering mechanism for your skill, and helps the agent understand when to use the skill.\n  - Include both what the Skill does and specific triggers/contexts for when to use it.\n  - Include all \"when to use\" information here - Not in the body. The body is only loaded after triggering, so \"When to Use This Skill\" sections in the body are not helpful to the agent.\n  - Example description for a `docx` skill: \"Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when the agent needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks\"\n\nKeep frontmatter minimal. In `nanobot`, `metadata` and `always` are also supported when needed, but avoid adding extra fields unless they are actually required.\n\n##### Body\n\nWrite instructions for using the skill and its bundled resources.\n\n### Step 5: Packaging a Skill\n\nOnce development of the skill is complete, it must be packaged into a distributable .skill file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder>\n```\n\nOptional output directory specification:\n\n```bash\nscripts/package_skill.py <path/to/skill-folder> ./dist\n```\n\nThe packaging script will:\n\n1. **Validate** the skill automatically, checking:\n   - YAML frontmatter format and required fields\n   - Skill naming conventions and directory structure\n   - Description completeness and quality\n   - File organization and resource references\n\n2. **Package** the skill if validation passes, creating a .skill file named after the skill (e.g., `my-skill.skill`) that includes all files and maintains the proper directory structure for distribution. The .skill file is a zip file with a .skill extension.\n\n   Security restriction: symlinks are rejected and packaging fails when any symlink is present.\n\nIf validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.\n\n### Step 6: Iterate\n\nAfter testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.\n\n**Iteration workflow:**\n\n1. Use the skill on real tasks\n2. Notice struggles or inefficiencies\n3. Identify how SKILL.md or bundled resources should be updated\n4. Implement changes and test again\n\n<!-- File: nanobot/skills/summarize/SKILL.md (Tokens: ~572 | Category: anthropic-skill) -->\n---\nname: summarize\ndescription: Summarize or extract text and transcripts from URLs, YouTube videos, podcasts, and local files.\nhomepage: https://summarize.sh\nmetadata: {\"nanobot\":{\"emoji\":\"🧾\",\"requires\":{\"bins\":[\"summarize\"]},\"install\":[{\"id\":\"brew\",\"kind\":\"brew\",\"formula\":\"steipete/tap/summarize\",\"bins\":[\"summarize\"],\"label\":\"Install summarize (brew)\"}]}}\n---\n\n# Summarize\n\nFast CLI to summarize URLs, local files, and YouTube links.\n\n## When to use (trigger phrases)\n\nUse this skill immediately when the user asks any of:\n- “use summarize.sh”\n- “what’s this link/video about?”\n- “summarize this URL/article”\n- “transcribe this YouTube/video” (best-effort transcript extraction; no `yt-dlp` needed)\n\n## Quick start\n\n```bash\nsummarize \"https://example.com\" --model google/gemini-3-flash-preview\nsummarize \"/path/to/file.pdf\" --model google/gemini-3-flash-preview\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto\n```\n\n## YouTube: summary vs transcript\n\nBest-effort transcript (URLs only):\n\n```bash\nsummarize \"https://youtu.be/dQw4w9WgXcQ\" --youtube auto --extract-only\n```\n\nIf the user asked for a transcript but it’s huge, return a tight summary first, then ask which section/time range to expand.\n\n## Model + keys\n\nSet the API key for your chosen provider:\n- OpenAI: `OPENAI_API_KEY`\n- Anthropic: `ANTHROPIC_API_KEY`\n- xAI: `XAI_API_KEY`\n- Google: `GEMINI_API_KEY` (aliases: `GOOGLE_GENERATIVE_AI_API_KEY`, `GOOGLE_API_KEY`)\n\nDefault model is `google/gemini-3-flash-preview` if none is set.\n\n## Useful flags\n\n- `--length short|medium|long|xl|xxl|<chars>`\n- `--max-output-tokens <count>`\n- `--extract-only` (URLs only)\n- `--json` (machine readable)\n- `--firecrawl auto|off|always` (fallback extraction)\n- `--youtube auto` (Apify fallback if `APIFY_API_TOKEN` set)\n\n## Config\n\nOptional config file: `~/.summarize/config.json`\n\n```json\n{ \"model\": \"openai/gpt-5.2\" }\n```\n\nOptional services:\n- `FIRECRAWL_API_KEY` for blocked sites\n- `APIFY_API_TOKEN` for YouTube fallback\n\n<!-- File: nanobot/skills/tmux/SKILL.md (Tokens: ~1256 | Category: anthropic-skill) -->\n---\nname: tmux\ndescription: Use when a CLI task needs an interactive terminal or control of a tmux session.\nmetadata: {\"nanobot\":{\"emoji\":\"🧵\",\"os\":[\"darwin\",\"linux\"],\"requires\":{\"bins\":[\"tmux\"]}}}\n---\n\n# tmux Skill\n\nUse tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.\n\n## Quickstart (isolated socket, exec tool)\n\n```bash\nSOCKET_DIR=\"${NANOBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/nanobot-tmux-sockets}\"\nmkdir -p \"$SOCKET_DIR\"\nSOCKET=\"$SOCKET_DIR/nanobot.sock\"\nSESSION=nanobot-python\n\ntmux -S \"$SOCKET\" new -d -s \"$SESSION\" -n shell\ntmux -S \"$SOCKET\" send-keys -t \"$SESSION\":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter\ntmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\nAfter starting a session, always print monitor commands:\n\n```\nTo monitor:\n  tmux -S \"$SOCKET\" attach -t \"$SESSION\"\n  tmux -S \"$SOCKET\" capture-pane -p -J -t \"$SESSION\":0.0 -S -200\n```\n\n## Socket convention\n\n- Use `NANOBOT_TMUX_SOCKET_DIR` environment variable.\n- Default socket path: `\"$NANOBOT_TMUX_SOCKET_DIR/nanobot.sock\"`.\n\n## Targeting panes and naming\n\n- Target format: `session:window.pane` (defaults to `:0.0`).\n- Keep names short; avoid spaces.\n- Inspect: `tmux -S \"$SOCKET\" list-sessions`, `tmux -S \"$SOCKET\" list-panes -a`.\n\n## Finding sessions\n\n- List sessions on your socket: `{baseDir}/scripts/find-sessions.sh -S \"$SOCKET\"`.\n- Scan all sockets: `{baseDir}/scripts/find-sessions.sh --all` (uses `NANOBOT_TMUX_SOCKET_DIR`).\n\n## Sending input safely\n\n- Prefer literal sends: `tmux -S \"$SOCKET\" send-keys -t target -l -- \"$cmd\"`.\n- Control keys: `tmux -S \"$SOCKET\" send-keys -t target C-c`.\n\n## Watching output\n\n- Capture recent history: `tmux -S \"$SOCKET\" capture-pane -p -J -t target -S -200`.\n- Wait for prompts: `{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern'`.\n- Attaching is OK; detach with `Ctrl+b d`.\n\n## Spawning processes\n\n- For python REPLs, set `PYTHON_BASIC_REPL=1` (non-basic REPL breaks send-keys flows).\n\n## Windows / WSL\n\n- tmux is supported on macOS/Linux. On Windows, use WSL and install tmux inside WSL.\n- This skill is gated to `darwin`/`linux` and requires `tmux` on PATH.\n\n## Orchestrating Coding Agents (Codex, Claude Code)\n\ntmux excels at running multiple coding agents in parallel:\n\n```bash\nSOCKET=\"${TMPDIR:-/tmp}/codex-army.sock\"\n\n# Create multiple sessions\nfor i in 1 2 3 4 5; do\n  tmux -S \"$SOCKET\" new-session -d -s \"agent-$i\"\ndone\n\n# Launch agents in different workdirs\ntmux -S \"$SOCKET\" send-keys -t agent-1 \"cd /tmp/project1 && codex --yolo 'Fix bug X'\" Enter\ntmux -S \"$SOCKET\" send-keys -t agent-2 \"cd /tmp/project2 && codex --yolo 'Fix bug Y'\" Enter\n\n# Poll for completion (check if prompt returned)\nfor sess in agent-1 agent-2; do\n  if tmux -S \"$SOCKET\" capture-pane -p -t \"$sess\" -S -3 | grep -q \"❯\"; then\n    echo \"$sess: DONE\"\n  else\n    echo \"$sess: Running...\"\n  fi\ndone\n\n# Get full output from completed session\ntmux -S \"$SOCKET\" capture-pane -p -t agent-1 -S -500\n```\n\n**Tips:**\n- Use separate git worktrees for parallel fixes (no branch conflicts)\n- `pnpm install` first before running codex in fresh clones\n- Check for shell prompt (`❯` or `$`) to detect completion\n- Codex needs `--yolo` or `--full-auto` for non-interactive fixes\n\n## Cleanup\n\n- Kill a session: `tmux -S \"$SOCKET\" kill-session -t \"$SESSION\"`.\n- Kill all sessions on a socket: `tmux -S \"$SOCKET\" list-sessions -F '#{session_name}' | xargs -r -n1 tmux -S \"$SOCKET\" kill-session -t`.\n- Remove everything on the private socket: `tmux -S \"$SOCKET\" kill-server`.\n\n## Helper: wait-for-text.sh\n\n`{baseDir}/scripts/wait-for-text.sh` polls a pane for a regex (or fixed string) with a timeout.\n\n```bash\n{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]\n```\n\n- `-t`/`--target` pane target (required)\n- `-p`/`--pattern` regex to match (required); add `-F` for fixed string\n- `-T` timeout seconds (integer, default 15)\n- `-i` poll interval seconds (default 0.5)\n- `-l` history lines to search (integer, default 1000)\n\n<!-- File: nanobot/skills/weather/SKILL.md (Tokens: ~542 | Category: anthropic-skill) -->\n---\nname: weather\ndescription: Get current weather and forecasts.\nhomepage: https://wttr.in/:help\nmetadata: {\"nanobot\":{\"emoji\":\"🌤️\",\"requires\":{\"bins\":[\"curl\"]}}}\n---\n\n# Weather\n\nTwo free services, no API keys needed.\n\n## wttr.in (primary)\n\nChoose one request that matches the user's scope. Do not fetch current\nconditions separately when a today or forecast request already includes them.\n\nPlatform notes:\n- On Windows PowerShell, use `curl.exe`; bare `curl` may resolve to\n  `Invoke-WebRequest`.\n- On macOS and Linux, use `curl`.\n\nCurrent conditions only:\n```bash\ncurl -s \"https://wttr.in/London?format=3\"\n# Output: London: ⛅️ +8°C\n```\n\nCustom current conditions format:\n```bash\ncurl -s \"https://wttr.in/London?format=%l:+%c+%t+%h+%w\"\n# Output: London: ⛅️ +8°C 71% ↙5km/h\n```\n\nToday's weather, including current conditions (use this single request for\nquestions about today's weather):\n```bash\ncurl -s \"https://wttr.in/London?1&m\"\n```\n\nFull forecast:\n```bash\ncurl -s \"https://wttr.in/London?T&m\"\n```\n\nOn Windows PowerShell, replace `curl` with `curl.exe` in the commands above.\n\nFormat codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon\n\nTips:\n- URL-encode spaces: `wttr.in/New+York`\n- Airport codes: `wttr.in/JFK`\n- Units: `?m` (metric) `?u` (USCS)\n- Today only: `?1` · Current only: `?0`\n- PNG (macOS/Linux): `curl -s \"https://wttr.in/Berlin.png\" -o weather.png`\n- PNG (Windows PowerShell): `curl.exe -s \"https://wttr.in/Berlin.png\" -o weather.png`\n\n## Open-Meteo (fallback, JSON)\n\nFree, no key, good for programmatic use:\n```bash\ncurl -s \"https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true\"\n```\n\nFind coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.\n\nDocs: https://open-meteo.com/en/docs\n</yakaai_skills>"}