new-skill
npx machina-cli add skill shane9coy/katana-agent/new-skill --openclawNew Skill — Skill Creator
When This Fires
- User asks to "create a skill", "make a new skill", "save this as a skill"
- Agent nudge fires after solving a complex, reusable problem
Steps
1. Check existing skills first
Read ~/.katana/memory/skills/_index.md to see if a similar skill already exists.
If yes → update the existing skill instead of creating a duplicate.
2. Gather info
- Name: kebab-case (e.g.,
jwt-auth-pattern) - Category: coding, devops, research, personal, automation, or ask user
- Description: Concise trigger text (max 200 chars, wrapped in quotes)
3. Create the skill folder
~/.katana/memory/skills/{category}/{skill-name}/
├── SKILL.md # Main skill file
├── references/ # (optional) supporting docs
└── scripts/ # (optional) executable helpers
4. Write SKILL.md
---
aliases: [{skill-name}]
name: {skill-name}
description: "{concise description}"
created: {YYYY-MM-DD}
agent: {which-agent-created-this}
tags: [skill, {category}, {relevant-tags}]
times_used: 0
last_used: null
---
# {Skill Title}
## When to Use
{When should the agent trigger this skill}
## Steps
{Step-by-step instructions}
## Gotchas
{Common pitfalls and edge cases}
## Related
- Created during [[{session-name}]]
5. Update the index
Append to ~/.katana/memory/skills/_index.md:
## {Category}
- [[{skill-name}]] — {brief description}
6. Confirm
✓ Created skill: {skill-name}
Location: ~/.katana/memory/skills/{category}/{skill-name}/
Indexed in: ~/.katana/memory/skills/_index.md
Rules
- Put instructions, code snippets, bash commands INLINE in SKILL.md
- Only use references/ for large files that would bloat the skill
- Only use scripts/ for executable files the agent runs directly
- Keep SKILL.md under 500 lines
- Always use [[wikilinks]] to connect to related sessions/projects
- Always include the
aliasesfrontmatter field for Obsidian wikilink resolution
Source
git clone https://github.com/shane9coy/katana-agent/blob/main/templates/universal/skills/new-skill/SKILL.mdView on GitHub Overview
This tool scaffolds a brand-new skill by gathering essential metadata, creating the workspace, and generating a correctly formatted SKILL.md. It also registers the skill in the Obsidian vault index and prevents duplicates by checking existing skills first. The result is a ready-to-use, consistently structured skill that can be reused across projects.
How This Skill Works
It first checks ~/.katana/memory/skills/_index.md to avoid duplicates. It then collects the necessary data (name in kebab-case, category, and a concise description), creates the folder structure, and writes SKILL.md with a standardized YAML frontmatter and sections. Finally it appends to the index and returns a confirmation of the created skill location.
When to Use It
- User asks to create, build, or scaffold a new skill (e.g., 'make a new skill' or 'save this as a skill').
- You want to register a reusable capability after solving a complex problem.
- You need to prevent duplicates by checking existing skills before creation.
- You need to bootstrap the required folder structure for a new skill in the vault.
- You want to store a concise trigger description and metadata for later reuse.
Quick Start
- Step 1: Check for existing skills and collect Name (kebab-case), Category, and Description.
- Step 2: Create ~/.katana/memory/skills/{category}/{skill-name}/ and write SKILL.md with frontmatter and sections.
- Step 3: Append to ~/.katana/memory/skills/_index.md and confirm the created skill with the standard message.
Best Practices
- Always check for existing skills before creating a new one to avoid duplicates.
- Use a kebab-case name for the skill and fill a concise, quoted description.
- Keep SKILL.md under 500 lines and use inline instructions, not long blocks.
- Write clear 'When to Use' and 'Steps' sections with actionable guidance.
- Update the index and include wikilinks to related sessions and projects.
Example Use Cases
- Create a 'jwt-auth-pattern' skill that documents typical JWT validation and error handling.
- Bootstrap a 'data-cleaning-pipeline' skill for reusable data prep steps.
- Save a solved deployment workflow as 'ci-cd-deploy' skill.
- Publish a 'monitoring-alerts-setup' skill for standard alerting templates.
- Archive a 'github-actions-template' skill with common action sequences.