mythril-agent-skills
AGENTS.md8 starsChanged 2 months agoApache-2.0View on GitHub
mythril-agent-skills is a pip-installable package of reusable skills for AI coding assistants (Github Copilot, Claude Code, Cursor, Codex, Gemini CLI, Qwen CLI, Opencode, Cline, Grok CLI, OpenClaw, OpenSquilla, Hermes). Each skill is a self-contained directory with a SKILL.md that defines its metadata, triggering description, and instructions. Tech Stack: - Primary Language: Python 3.10+ - Package Format: pyproject.toml (setuptools) - Configuration: YAML (frontmatter in SKILL.md) - Documentation: Markdown - CLI: Python (curses-based interactive installer and cleanup tool) Installed via pip install…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
35 rules. About 0 are common, 12 are distinctive, and 23 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
23
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 57
All CLI scripts use Python curses for interactive multi-select UIs.
- Very specific: line 76
If a local skill has the same name as a builtin skill, it is highlighted in magenta with an (overrides builtin) note.
- Very specific: line 142
All config directories are relative to the user home directory (~ on macOS/Linux, %USERPROFILE% on Windows).
- Very specific: line 179
All plugins use strict: false — no plugin.json needed.
- Distinctive: line 196
All plugins share a single unified version — the same semver string as the pip package.
- Very specific: line 198
Use python3 scripts/bump-version.py <version> to update all three files (pyproject.toml, __init__.py, marketplace.json) at once — it also …
- Very specific: line 202
When adding a new skill directory under mythril_agent_skills/skills/<name>/:
- Very specific: line 204
Create the plugin wrapper: mkdir -p plugins/<name>/skills && ln -s ../../../mythril_agent_skills/skills/<name> plugins/<name>/skills/<name>
- Very specific: line 205
Add a new plugin entry in .claude-plugin/marketplace.json
- Distinctive: line 274
Avoid vague descriptions — specificity improves triggering accuracy
- Very specific: line 316
No external dependencies → CLI tool dependency (git) → Platform CLI dependency (gh) → API token dependency
- Distinctive: line 325
When adding a new skill, place it in the appropriate category.
- Very specific: line 353
Design principle: Only git-repo-reader writes to the shared cache (clone, pull, sync).
- Very specific: line 359
IMPORTANT: Do NOT use temp roots such as $TMPDIR, /tmp, or %TEMP% for skill cache.
- Distinctive: line 404
All approaches resolve to one stable per-user location per platform:
- Distinctive: line 414
Default rule for ALL downloads: if the user did not explicitly provide a destination path, save into the unified cache path above (never …
- Very specific: line 441
Verify that bundled shared assets (e.g.
- Very specific: line 491
If you added a new asset or a new consumer, update specs() in scripts/sync-shared-assets.py.
- Very specific: line 492
Run python3 scripts/sync-shared-assets.py to materialize bundled copies.
- Distinctive: line 493
Commit BOTH the canonical source and the bundled copies in the same commit (they are inseparable).
- Distinctive: line 495
NEVER hand-edit a bundled copy directly — your changes will be lost on the next sync, and the drift test will fail the build in the …
- Very specific: line 579
Use dict[str, str], list[str], str | None (Python 3.10+)
- Very specific: line 582
Paths: use pathlib.Path, not os.path or raw strings
- Very specific: line 596
Always quote variables: "$VAR"
- Distinctive: line 601
Start at H1, don't skip heading levels
- Distinctive: line 604
Keep README.md content in English only
- Distinctive: line 619
Keep commits atomic: one logical change per commit
- Very specific: line 620
Never commit .claude/, .copilot/, or local build artifacts
- Very specific: line 628
Use pathlib.Path for all file operations
- Distinctive: line 629
Write type hints on all functions
- Very specific: line 630
Check file existence before reading: if not path.exists():
- Very specific: line 631
Use context managers: with open(...) as f:
- Very specific: line 634
Use bare except: or silently swallow exceptions
- Distinctive: line 637
Delete or modify eval/test files to force passing validation
- Very specific: line 650
When you need to understand the codebase, check if graphify-out/graph.json exists before reading source files directly.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Development Guidelines for mythril-agent-skills Repository
Project Overview
mythril-agent-skills is a pip-installable package of reusable skills for AI coding assistants (Github Copilot, Claude Code, Cursor, Codex, Gemini CLI, Qwen CLI, Opencode, Cline, Grok CLI, OpenClaw, OpenSquilla, Hermes). Each skill is a self-contained directory with a SKILL.md that defines its metadata, triggering description, and instructions.
Tech Stack:
- Primary Language: Python 3.10+
- Package Format:
pyproject.toml(setuptools) - Configuration: YAML (frontmatter in SKILL.md)
- Documentation: Markdown
- CLI: Python (curses-based interactive installer and cleanup tool)
Package Structure
mythril-agent-skills/
├── .claude-plugin/ # Claude Code plugin marketplace
│ └── marketplace.json # Plugin catalog for /plugin install
├── .workbuddy-plugin/ # WorkBuddy AI / CodeBuddy Code marketplace
│ └── marketplace.json # Generated from .claude-plugin/
├── mythril_agent_skills/ # Python package (also the all-in-one plugin)
│ ├── __init__.py
│ ├── cli/ # CLI entry points
│ │ ├── skills_setup.py # Interactive installer
│ │ ├── skills_cleanup.py # Interactive remover
│ │ └── skills_check.py # Dependency checker & configurator
│ └── skills/ # Bundled skill definitions
├── plugins/ # Per-skill plugin wrappers (symlinks into skills/)
│ ├── figma/skills/figma # → mythril_agent_skills/skills/figma
│ ├── jira/skills/jira # → mythril_agent_skills/skills/jira
│ └── .../ # One wrapper per skill
├── tests/ # Unit tests
│ ├── conftest.py # Shared fixtures (sys.path setup)
│ └── skills/ # One test file per skill
├── scripts/ # Backward-compatible wrappers (for dev use)
│ ├── sync-upstream.py # Fork upstream sync tool
│ └── init-fork.py # One-time fork initializer (detach + git re-init)
├── .sync-upstream.json # Upstream sync config (for forks)
├── pyproject.toml # Package configuration
└── ...CLI Commands
Installed via pip install mythril-agent-skills (or pip install -e . for development):
| Command | Entry point | Description |
skills-setup | mythril_agent_skills.cli.skills_setup:main | Interactive installer |
skills-cleanup | mythril_agent_skills.cli.skills_cleanup:main | Interactive remover |
skills-check | mythril_agent_skills.cli.skills_check:main | Dependency checker |
skills-clean-cache | mythril_agent_skills.cli.skills_clean_cache:main | Cache directory cleaner |
All CLI scripts use Python curses for interactive multi-select UIs. They support macOS, Linux, and Windows (auto-install windows-curses on Windows if needed).
Setup: skills-setup
Syncs selected skills from the installed package to your AI assistant's user-level configuration directory. Also discovers local skills in the current working directory.
skills-setup # Interactive: select tools, then skills
skills-setup .cursor # Direct target: skip tool selectionInteractive mode launches two multi-select screens:
- Select AI tools — choose which tools to install skills to
- Select skills — choose which skills to install
The skill selection screen is divided into two sections:
- Builtin Skills — skills bundled with the
mythril-agent-skillspackage - Local Skills — skills discovered in the current working directory (immediate non-hidden subdirectories containing a
SKILL.mdfile)
If a local skill has the same name as a builtin skill, it is highlighted in magenta with an (overrides builtin) note. When both are selected, builtin skills are installed first and the local version is installed last, so the local version takes precedence.
skills-check only runs for builtin skills after installation. Local skills are excluded — their dependency management is the user's responsibility.
Controls: Up/Down move, Space toggle, a all/none, Enter confirm, q quit.
Cleanup: skills-cleanup
Scans AI tool config directories for installed skills and lets you selectively remove them.
skills-cleanupLaunches two screens:
- Select AI tools — choose which tool directories to scan (defaults to all detected)
- Select skills to remove — tree view showing each tool and its installed skills (defaults to none selected)
Check: skills-check
Checks and configures external dependencies (CLI tools, API tokens) for selected skills.
skills-check gh-operations jira figmaFeatures:
- Auto-installs missing CLI tools (e.g.
gh) with user confirmation - Prompts for missing API keys and saves them to the shell config file
- Verifies authentication status
Clean Cache: skills-clean-cache
Removes cached files created by skills at runtime. The cache contains two categories: temp files (images, exports — ephemeral) and repo cache (shared git clones — long-lived, reusable). The interactive mode lets users choose to clean one or both categories.
skills-clean-cache # Interactive: list cache contents, choose what to delete
skills-clean-cache --force # Delete everything without confirmation
skills-clean-cache --repos # Interactive: select repos to deleteBackward-compatible wrappers
The scripts/ directory contains thin wrappers for running without pip install:
python3 scripts/skills-setup.py
python3 scripts/skills-cleanup.py
python3 scripts/skills-check.py gh-operations jira figma
python3 scripts/skills-clean-cache.pyFork upstream sync
For users who fork this repository to maintain private skills, a sync script keeps the fork up to date with upstream:
python3 scripts/sync-upstream.py # Interactive sync
python3 scripts/sync-upstream.py --dry-run # Preview only
python3 scripts/sync-upstream.py --force # No confirmationConfiguration is in .sync-upstream.json (repo root). The exclude_skills list prevents specific skills from being overwritten during sync. See docs/FORK-SYNC.md for details.
Supported tools
All config directories are relative to the user home directory (~ on macOS/Linux, %USERPROFILE% on Windows).
| # | Tool | Config directory | Skills path |
| 1 | Copilot CLI / VS Code | ~/.copilot/ | ~/.copilot/skills/ |
| 2 | Claude Code | ~/.claude/ | ~/.claude/skills/ |
| 3 | Cursor | ~/.cursor/ | ~/.cursor/skills/ |
| 4 | Codex | ~/.codex/ | ~/.codex/skills/ |
| 5 | Gemini CLI | ~/.gemini/ | ~/.gemini/skills/ |
| 6 | Qwen CLI | ~/.qwen/ | ~/.qwen/skills/ |
| 7 | Opencode | ~/.config/opencode/ | ~/.config/opencode/skills/ |
| 8 | Grok CLI | ~/.grok/ | ~/.grok/skills/ |
| 9 | OpenClaw | ~/.openclaw/ | ~/.openclaw/skills/ |
| 10 | OpenSquilla | ~/.opensquilla/ | ~/.opensquilla/skills/ |
| 11 | Hermes | ~/.hermes/ | ~/.hermes/skills/ |
| 12 | CodeBuddy | ~/.codebuddy/ | ~/.codebuddy/skills/ |
| 13 | WorkBuddy AI | ~/.workbuddy-ai/ | ~/.workbuddy-ai/skills/ |
| 14 | Cline | ~/.cline/ | ~/.cline/skills/ |
| 15 | Pi / DeepSeek Harness | ~/.agents/ | ~/.agents/skills/ |
~/.agents/skills/ is the cross-tool shared Agent Skills convention directory (agentskills.io) — read by DeepSeek Harness (dsh), DeepSeek Deep Code, Pi, OpenClaw, Cline, Kimi Code CLI, Warp, Zed, and others. Skills installed there are visible to every compliant tool.
WorkBuddy AI: the desktop app injects
CODEBUDDY_CONFIG_DIR=~/.workbuddy-aiwhen it launches its bundled CodeBuddy engine, so the user-level skills directory resolves to~/.workbuddy-ai/skills/(project-level skills live in<project>/.workbuddy-ai/skills/). The same config directory also holdssettings.json(hooks) andplugins/.
Claude Code Plugin Marketplace
This repository doubles as a Claude Code plugin marketplace. The catalog at .claude-plugin/marketplace.json exposes all bundled skills as a single installable plugin. WorkBuddy AI and CodeBuddy Code read the same catalog format from .workbuddy-plugin/marketplace.json.
Architecture
- All-in-one plugin (
all-skills): source./mythril_agent_skills— Claude Code auto-discovers all skills fromskills/*/SKILL.md - Per-skill plugins (
figma,jira, etc.): source./plugins/<name>— each is a thin wrapper with a symlinkskills/<name>→../../../mythril_agent_skills/skills/<name> - All plugins use
strict: false— noplugin.jsonneeded; marketplace entry is the full definition
Derived catalogs (WorkBuddy AI / CodeBuddy Code)
Claude Code scans .claude-plugin/; WorkBuddy AI and CodeBuddy Code scan
.workbuddy-plugin/ / .codebuddy-plugin/. To avoid maintaining a second
catalog by hand, .workbuddy-plugin/marketplace.json is generated:
scripts/sync-marketplaces.pycopies the canonical catalog verbatim and drops the Claude-only$schemakeyscripts/sync-marketplaces.py --checkverifies it has not drifted (exit 1 on drift)tests/test_marketplace_sync.pyfails CI on driftscripts/bump-version.pyandscripts/publish.pyrun the sync/check automatically
Never hand-edit .workbuddy-plugin/marketplace.json — edit .claude-plugin/marketplace.json (the canonical source) and run the sync script.
Versioning
All plugins share a single unified version — the same semver string as the pip package. Per-skill plugins are symlink wrappers with no independent code, so independent versions would have no meaning.
Use python3 scripts/bump-version.py <version> to update all three files (pyproject.toml, __init__.py, marketplace.json) at once — it also regenerates the derived .workbuddy-plugin/ catalog. The publish script (scripts/publish.py) checks all three sources for consistency, plus derived-catalog drift, before uploading.
Adding a new skill to the marketplace
When adding a new skill directory under mythril_agent_skills/skills/<name>/:
- Create the plugin wrapper:
mkdir -p plugins/<name>/skills && ln -s ../../../mythril_agent_skills/skills/<name> plugins/<name>/skills/<name> - Add a new plugin entry in
.claude-plugin/marketplace.json - The
all-skillsplugin picks it up automatically (no change needed)
User installation
/plugin marketplace add jie-meng/mythril-agent-skills
/plugin install all-skills@mythril-agent-skills # all skills
/plugin install figma@mythril-agent-skills # single skillWorkBuddy AI / CodeBuddy Code use the same commands — point them at the same
repository (or a local clone); they pick up .workbuddy-plugin/marketplace.json
automatically. Run /reload-plugins after installing.
Skill File Structure
Each skill is a directory under mythril_agent_skills/skills/:
mythril_agent_skills/skills/skill-name/
├── SKILL.md # Required: metadata + instructions
├── README.md # Optional: overview for humans
├── scripts/ # Optional: helper Python/Bash scripts
├── references/ # Optional: documentation, guides, schemas
├── agents/ # Optional: prompt/instruction files for evaluations
└── assets/ # Optional: templates, icons, HTML/CSS resourcesWriting a High-Quality SKILL.md
SKILL.md must begin with YAML frontmatter:
---
name: skill-name
description: |
Multi-line description explaining when to use this skill.
Include trigger keywords and use cases.
Be specific — mention concrete contexts and phrases that should activate the skill.
license: Apache-2.0
---
# Skill Name
Detailed instructions, examples, and workflows...Required fields:
name: Skill identifier (matches directory name)description: When and why to trigger — this is the AI's activation signal. Be precise and "pushy": list specific contexts, keywords, and phrases.
Optional fields:
license: Skill license (e.g.,Apache-2.0,MIT). Defaults to Apache-2.0 if not specified.allowed-tools: List of tools the skill may usecompatibility: Tool/platform requirements
Character limit:
- The
descriptionfield MUST be at most 1024 characters. Multiple AI tools enforce this limit at load time — skills with longer descriptions will fail to load silently. Always verify length after editing a description:python3 scripts/validate-skill-descriptions.py
Tips for a good description:
- State explicitly when to invoke the skill (trigger conditions)
- List example user phrases that should activate it
- Mention what the skill does, not just what it is
- Avoid vague descriptions — specificity improves triggering accuracy
Security Rules for Skills Using API Tokens or Credentials
Skills that require API tokens, passwords, or other credentials (e.g. ATLASSIAN_API_TOKEN, FIGMA_ACCESS_TOKEN, GH_TOKEN) MUST include a "Security — MANDATORY rules for AI agents" section in their SKILL.md with these rules:
- NEVER echo, print, or log the value of any environment variable — even for debugging. Commands like
echo $TOKEN,printenv TOKEN,env | grep TOKENare strictly forbidden. - NEVER pass credential values as inline CLI arguments or env-var overrides (e.g.
TOKEN=xxx python3 script.py). Scripts MUST read credentials from the environment internally viaos.environ. The AI agent simply runs the script — no manual credential handling. - NEVER read environment variable values using shell commands or programmatic access. The AI agent should not inspect, verify, or access token values in any way.
- When debugging auth errors, rely solely on the script's error messages (401, 403, etc.). Do NOT attempt to verify tokens by reading or printing them.
- NEVER extract credentials from OS credential stores or config files. The following are strictly forbidden — even for debugging or troubleshooting auth failures:
- macOS Keychain:
security find-internet-password,security find-generic-password,security dump-keychain - Linux secret stores:
secret-tool,kwallet-query, GNOME Keyring CLI tools - Windows Credential Manager:
cmdkey /list,rundll32 keymgr.dll - Git credential helpers:
git credential fill,cat ~/.git-credentials,cat ~/.netrc - GitHub CLI config: reading or printing contents of
~/.config/gh/hosts.ymlor anyghauth config file - Any other command or file read that outputs a password, token, or secret value
- macOS Keychain:
- NEVER use extracted credential values in commands. Even if a credential value is somehow visible (e.g. from a previous session's output), do NOT copy and use it in
curl -H "Authorization: token <value>", API calls, or any other command. Tools likeghand bundled scripts handle authentication internally — the AI agent must never manually construct authenticated requests using raw credential values.
These rules prevent accidental credential exposure in terminal output, chat logs, and conversation transcripts.
For skills_check.py: Token values MUST be masked (show only last 4 chars). Email addresses MUST be partially masked (e.g. j***@example.com). Base URLs may be shown in full.
Skill Ordering Convention
Skills appear in multiple listings: the README "Available Skills" table, the skills-check interactive UI and execution order, and the CHECKABLE_SKILLS list in code. All MUST follow the same ordering convention.
Category order (groups, top to bottom):
| # | Category | Description | Example skills |
| 1 | Meta | Tools for creating/managing skills themselves | skill-creator |
| 2 | Code Review | Code review workflows (local and remote) | code-review-staged, branch-diff-review, github-code-review-pr |
| 3 | Git & GitHub | Git operations and GitHub platform integration | git-repo-reader, gh-operations |
| 4 | API Integrations | Third-party API clients requiring credentials | jira, confluence, figma, glean, glm-vision-fallback |
| 5 | Data Processing | Python-based file processing tools | excel, pdf |
| 6 | Media Processing | Standalone CLI tools for media files | imagemagick, ffmpeg |
| 7 | Content | Content creation and writing tools | blog-writer |
| 8 | Project Planning | Estimation, scoping, and planning tools | story-point-estimate |
| 9 | Fullstack Workspace | Multi-repo workspace scaffolding, lifecycle, and cross-repo implementation | fullstack-init, fullstack-explore, fullstack-brief, fullstack-propose, fullstack-apply, fullstack-archive, fullstack-docs-migration |
Within each category, order by dependency complexity — no deps first, then CLI deps, then API credential deps:
- No external dependencies → CLI tool dependency (
git) → Platform CLI dependency (gh) → API token dependency
For skills-check: The execution order follows a different principle — dependency layers (check foundational tools before things that depend on them):
- Foundation CLI (
git) — almost everything depends on it - Platform CLI (
gh) — builds on git - API credentials (Atlassian, Figma) — need tokens configured
- Python packages (openpyxl, pypdf, pdfplumber) — pip-installable
- Standalone media tools (ImageMagick, FFmpeg) — independent binaries
When adding a new skill, place it in the appropriate category. If it doesn't fit any existing category, add a new category row and insert it at a logical position in the table.
Temporary Files & Cache Convention
See docs/CACHE.md for the full cache usage guide and examples.
Skills that need to download files, clone repos, or create temp artifacts at runtime MUST use the unified per-user cache directory:
<user-cache-root>/mythril-skills-cache/<skill-name>/Shared git repo cache
The git-repo-reader skill manages a shared repo cache at mythril-skills-cache/git-repo-cache/ via its scripts/repo_manager.py. Other skills (e.g., github-code-review-pr) can read this cache to reuse already-cloned repos without re-downloading.
# git-repo-reader: clone or reuse a cached repo
python3 scripts/repo_manager.py clone "<repo-url>"
# github-code-review-pr: check if repo is already cached (read-only lookup)
python3 scripts/repo_cache_lookup.py "<repo-url>"Cached repos live under mythril-skills-cache/git-repo-cache/repos/<host>/<owner>/<repo>/. They are long-lived — do NOT delete them after use. The skills-clean-cache command lets users selectively clean repo cache vs ephemeral temp files.
Design principle: Only git-repo-reader writes to the shared cache (clone, pull, sync). Other skills that benefit from cached repos bundle a lightweight read-only lookup script (repo_cache_lookup.py) that checks the same mapping file. This keeps each skill self-contained while enabling cross-skill cache reuse.
Cross-platform cache directory creation
Skills run on macOS, Linux, and Windows. Use the appropriate syntax for the user's platform.
IMPORTANT: Do NOT use temp roots such as $TMPDIR, /tmp, or %TEMP% for skill cache. Different tools may set different temp environments, causing non-unique cache paths. Always use per-user OS cache roots below.
Bash (macOS / Linux):
if [[ "$(uname -s)" == "Darwin" ]]; then
CACHE_ROOT="$HOME/Library/Caches/mythril-skills-cache"
else
CACHE_ROOT="${XDG_CACHE_HOME:-$HOME/.cache}/mythril-skills-cache"
fi
CACHE_DIR="$CACHE_ROOT/<skill-name>"
mkdir -p "$CACHE_DIR"
RUN_DIR=$(mktemp -d "$CACHE_DIR/XXXXXXXX")PowerShell (Windows):
$CACHE_ROOT = Join-Path ([Environment]::GetFolderPath("LocalApplicationData")) "mythril-skills-cache"
$CACHE_DIR = Join-Path $CACHE_ROOT "<skill-name>"
New-Item -ItemType Directory -Force -Path $CACHE_DIR | Out-Null
$RUN_DIR = Join-Path $CACHE_DIR ([System.IO.Path]::GetRandomFileName())
New-Item -ItemType Directory -Force -Path $RUN_DIR | Out-NullPython:
from pathlib import Path
import os
import platform
home = Path.home()
if platform.system() == "Darwin":
cache_root = home / "Library" / "Caches" / "mythril-skills-cache"
elif platform.system() == "Windows":
local_app_data = os.environ.get("LOCALAPPDATA")
base = Path(local_app_data) if local_app_data else home / "AppData" / "Local"
cache_root = base / "mythril-skills-cache"
else:
xdg_cache_home = os.environ.get("XDG_CACHE_HOME")
base = Path(xdg_cache_home) if xdg_cache_home else home / ".cache"
cache_root = base / "mythril-skills-cache"
cache_dir = cache_root / "<skill-name>"
cache_dir.mkdir(parents=True, exist_ok=True)All approaches resolve to one stable per-user location per platform:
- macOS:
/Users/<user>/Library/Caches/mythril-skills-cache/... - Linux:
/home/<user>/.cache/mythril-skills-cache/...(or$XDG_CACHE_HOME/mythril-skills-cache/...) - Windows:
C:\Users\<user>\AppData\Local\mythril-skills-cache\...
Cache directory rules
- Each skill gets its own subdirectory named after the skill (e.g.,
github-code-review-pr/,figma/) - Git repo clones go into the shared
git-repo-cache/subdirectory, managed bygit-repo-reader'srepo_manager.py. - Within the subdirectory, create random dirs freely — e.g.,
mktemp -d "$CACHE_DIR/XXXXXXXX" - Default rule for ALL downloads: if the user did not explicitly provide a destination path, save into the unified cache path above (never ad-hoc locations)
- If user explicitly provides a destination path, follow it; otherwise always use the unified cache path
- Skills do NOT need to worry about cleanup — the
skills-clean-cachecommand handles it - Never create temp files directly in
/tmp/or other ad-hoc locations
Automatic access to cache files
Files under the unified cache directory are skill-managed temporary artifacts (downloaded images, cloned repos, exported assets). The AI agent MUST read, write, and delete these files automatically without asking the user for confirmation. These files were created by the skill itself during the current or a previous session — they are inherently trusted and ephemeral. This applies regardless of whether the cache path falls inside or outside the current workspace directory.
This convention ensures skills-clean-cache can find and remove all skill-generated temp data in one pass.
Validation
Validate a skill's SKILL.md structure before committing:
python3 mythril_agent_skills/skills/skill-creator/scripts/quick_validate.py <skill-path>Validate description length across all skills (must not exceed 1024 characters):
python3 scripts/validate-skill-descriptions.pyVerify that bundled shared assets (e.g. mermaid_lint.py, MERMAID-RULES.md) match the canonical source — see "Shared assets across skills" below:
python3 scripts/sync-shared-assets.py --checkShared assets across skills
Each skill is installed individually into per-tool directories (e.g. ~/.claude/skills/<skill>/, ~/.cursor/skills/<skill>/, ~/.claude/plugins/.../<skill>/). When users select only one skill — via skills-setup, /plugin install <one-skill>, or by manually dropping a skill directory into their AI tool's skills/ folder — that skill must remain fully self-contained. Its scripts/ and references/ files must work without reaching outside the skill directory.
This rules out the "import from a sibling skill" or "import from a top-level package" patterns: at the user's machine there is no sibling, and mythril_agent_skills/shared/ is not part of any install path.
Design rule: single source, bundled copies
Some assets are inherently shared across multiple skills (e.g. mermaid rules + linter are needed by user-journey, fullstack-apply, and fullstack-propose; the graphify check is needed by all fullstack lifecycle skills). For those, the repo uses one canonical source plus byte-identical bundled copies inside each consumer skill:
| Layer | Path | Edited by | Travels with install? |
| Canonical source (single source of truth) | mythril_agent_skills/shared/<asset-group>/ | Humans / AI authoring the asset | NO — repo-internal only |
| Bundled copy (one per consuming skill) | mythril_agent_skills/skills/<consumer-skill>/{scripts,references}/<asset> | NEVER hand-edited — regenerated from canonical | YES — copied with the skill directory |
shared/ is the only place a shared asset is authored. The bundled copies under each skill are derived artifacts kept in lockstep by scripts/sync-shared-assets.py. The shared/ directory exists only inside this repository — it is excluded from every user-facing install path:
skills-setup(and/plugin install) copymythril_agent_skills/skills/<skill>/only —shared/is not under any skill, so it is never copied.- The Claude plugin marketplace (
.claude-plugin/marketplace.json) maps each plugin source to a path undermythril_agent_skills/skills/...orplugins/...— never toshared/. pip install mythril-agent-skillsdoes shipshared/(it's part of the Python package), but no runtime code imports from it — it exists only so repo maintainers can runsync-shared-assets.pyfrom an editable install if they want.
Cross-skill import rule
Skill scripts MUST import the bundled copy that sits beside them, never reach across skills or up to shared/:
# In mythril_agent_skills/skills/user-journey/scripts/init_workspace.py
SCRIPT_DIR = Path(__file__).resolve().parent
sys.path.insert(0, str(SCRIPT_DIR))
from mermaid_lint import escape_label_for_mermaid # ← bundled copy in same dir# In SKILL.md
python3 SKILL_PATH/scripts/mermaid_lint.py "<workspace>/JOURNEY.md"SKILL_PATH always resolves to the skill's own installed directory, so this works the same way under ~/.claude/skills/user-journey/, ~/.cursor/skills/user-journey/, or ~/.claude/plugins/.../user-journey/.
Workflow: adding or updating a shared asset
- Edit the canonical file under
mythril_agent_skills/shared/. - If you added a new asset or a new consumer, update
specs()inscripts/sync-shared-assets.py. - Run
python3 scripts/sync-shared-assets.pyto materialize bundled copies. - Commit BOTH the canonical source and the bundled copies in the same commit (they are inseparable). The drift test will fail CI if they get out of step.
NEVER hand-edit a bundled copy directly — your changes will be lost on the next sync, and the drift test will fail the build in the meantime.
CI guard
tests/test_shared_assets_sync.py(always runs inpytest) compares every bundled copy to its canonical source byte-by-byte. If anyone hand-edits a bundled copy, the test fails with a "run sync-shared-assets.py" message.python3 scripts/sync-shared-assets.py --checkis a standalone CI-friendly mode that printsPASS/FAILwithout modifying any files.
Currently shared
| Asset | Canonical | Consumed by |
mermaid_lint.py | shared/mermaid/mermaid_lint.py | fullstack-apply, fullstack-propose, fullstack-brief, user-journey |
MERMAID-RULES.md | shared/mermaid/MERMAID-RULES.md | fullstack-apply, fullstack-propose, fullstack-brief, user-journey |
graphify_check.py | shared/graphify/graphify_check.py | fullstack-init, fullstack-explore, fullstack-propose, fullstack-apply, fullstack-archive, fullstack-brief |
compute_waves.py | shared/waves/compute_waves.py | fullstack-propose, fullstack-apply |
plan_lint.py | shared/plan/plan_lint.py | fullstack-propose, fullstack-apply |
Note this is a different pattern from the git-repo-reader shared cache (above): the cache is runtime shared state on the user's machine, while shared assets are build-time duplicated files inside the repo. Both keep installed skills fully self-contained.
Testing
Unit tests live in tests/skills/, one file per skill. They cover pure/deterministic functions in skill scripts/ directories — URL parsing, formatters, validators, template rendering, gate logic, etc.
Running tests
pip install -e ".[test]" # first time only
pytest # run all
pytest -vv # verbose
pytest tests/skills/test_figma.py # single skill
pytest -k "parse_url" # filter by keywordRules for skill scripts and tests
- Every skill that has a
scripts/directory MUST have a corresponding test file attests/skills/test_<skill_name>.py(hyphens → underscores). - Test pure functions only — functions that take data in and return data out, with no network calls, subprocess invocations, or filesystem side effects. Typical candidates:
- URL/input parsing (
parse_repo_url,parse_issue_input,parse_figma_url) - Data formatting (
format_issue_markdown,rgba_to_hex,_strip_html) - Validation logic (
validate_skill,gate_no_speculation,detect_verdict) - Template/report rendering (
render_english,generate_markdown) - Key normalization (
normalize_key,normalized_identity)
- URL/input parsing (
- Functions that call external tools (network,
subprocess,gh,git, API clients) are NOT unit-tested. They are validated by integration usage. - Use
tmp_pathfor filesystem tests — when testing functions that read/write files (e.g.,validate_skill,load_map/save_map), create temp directories via pytest'stmp_pathfixture. Never touch real skill directories. - Import via module name directly —
conftest.pyadds all skillscripts/directories tosys.pathat session start. Import likefrom jira_api import format_adf_to_text, not via relative paths. - When adding a new script to an existing skill, add tests for its pure functions to the skill's existing test file.
- When creating a new skill with scripts, create the test file as part of the same commit.
- IDE type-checker paths are configured in
pyproject.tomlunder[tool.pyright] extraPaths. When adding a new skill with scripts, add itsscripts/path to this list.
Test file structure convention
"""Tests for <skill-name> skill scripts."""
import pytest
class TestFunctionName:
"""Tests for module.function_name."""
@pytest.fixture(autouse=True)
def _import(self):
from module_name import function_name
self.func = function_name
def test_normal_case(self):
assert self.func("input") == "expected"
def test_edge_case(self):
with pytest.raises(ValueError):
self.func("bad input")Code Style Guidelines
Python
- File naming:
snake_case:run_eval.py,utils.py - Shebang + docstring on all scripts:
#!/usr/bin/env python3 - Imports: stdlib → third-party → local
- Type hints: required on all function signatures
- Use
dict[str, str],list[str],str | None(Python 3.10+)
- Use
- Docstrings: concise triple-quote on all public functions
- Error handling: raise informative errors with context; no bare
except: - Paths: use
pathlib.Path, notos.pathor raw strings - Line length: 88 chars (Black standard)
def parse_skill_md(skill_path: Path) -> tuple[str, str, str]:
"""Parse a SKILL.md file, returning (name, description, full_content)."""
if not (skill_path / "SKILL.md").exists():
raise FileNotFoundError(f"SKILL.md not found at {skill_path}")Bash
- Shebang
#!/bin/bashand comment header UPPER_CASEconstants,lower_casevariables- Always quote variables:
"$VAR" - Explicit error checks or
set -e
Markdown
- Start at H1, don't skip heading levels
- Fenced code blocks with language tags
- Relative links for internal references
- Keep
README.mdcontent in English only
Naming Conventions
- Skill directories: lowercase, hyphenated:
skill-creator,code-review-staged - Scripts: lowercase, descriptive:
run_eval.py,quick_validate.py - Output directories:
outputs/under skill root
Git Commit Guidelines
- Format:
[skill-name] Brief descriptionor[scripts] Brief description - Keep commits atomic: one logical change per commit
- Never commit
.claude/,.copilot/, or local build artifacts
Common Patterns & Anti-Patterns
DO:
- Validate input early, raise informative errors
- Use
pathlib.Pathfor all file operations - Write type hints on all functions
- Check file existence before reading:
if not path.exists(): - Use context managers:
with open(...) as f:
DON'T:
- Use bare
except:or silently swallow exceptions - Hardcode absolute paths — use relative paths or CLI args
- Mix string paths and Path objects in the same function
- Delete or modify eval/test files to force passing validation
Graphify Knowledge Graph
This repository uses graphify to build a navigable knowledge graph. The graph is stored in graphify-out/ at the project root.
Permissions: AI agents MUST have read/write access to graphify-out/ and all its contents (graph.json, GRAPH_REPORT.md, graph.html, .graphify_python, cost.json, and any intermediate files). This is required for:
- Querying the graph (
graphify query "...") readsgraphify-out/graph.json - Building or rebuilding the graph reads/writes detection files, chunk files, and extraction caches in
graphify-out/ - Generating HTML/JSON output writes to
graphify-out/
When you need to understand the codebase, check if graphify-out/graph.json exists before reading source files directly. If it exists, run graphify query "<question>" first — the graph is faster and more comprehensive than ad-hoc file grepping.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

