Sandbox
@softspark/ai-toolkit

CLI toolkit for agent skills, rules, and hooks

ai-toolkit installs and updates shared agent assets such as skills, agents, hooks, rules, and plugin packs for multiple coding assistants and editors. It generates the right files for each target, including Claude Code, Cursor, Windsurf, Copilot, Gemini CLI, Codex CLI, and opencode, while also providing validation, repair, and benchmark commands.

172 stars20 forksPythonUpdated 7d ago
Who it's for

Builders who want their coding assistants to share the same rules, skills, and workflows across tools.

What it delivers

You can keep your agent setup consistent across editors instead of rebuilding it in every project.

What it does

Multi-editor installs

Generates the right config files for Claude Code, Cursor, Windsurf, Copilot, Gemini CLI, Codex CLI, opencode, Cline, Roo, Aider, Augment, and Antigravity.

Skills and agents packs

Ships dozens of reusable skills and 44 agent definitions, including slash commands and knowledge-based helpers.

Lifecycle hooks

Adds hook scripts for session flow, safety checks, prompt governance, and other enforcement around agent actions.

Safety constitution

Includes machine-enforced rules that block risky actions like destructive shell commands and unsafe database operations.

Plugin export flows

Can export app-native plugin packs for Claude Chat/Cowork and a marketplace-ready Codex plugin ZIP.

Validation and repair

Provides `validate`, `doctor`, and `update` commands to check, fix, and refresh installed assets.

How to get it

  1. 1macOS: /usr/bin/python3 is Python 3.9 and will not run the toolkit. Install a supported…
    # Option A: install globally (once per machine)
    npm install -g @softspark/ai-toolkit
    ai-toolkit install
    
    # Option B: try without installing (npx)
    npx @softspark/ai-toolkit install
  2. 2Run
    npm install -g @softspark/ai-toolkit@latest && ai-toolkit update
  3. 3Run
    cd your-project/
    ai-toolkit install --local                        # Claude Code only
    ai-toolkit install --local --editors all          # + all editors
    ai-toolkit install --local --editors cursor,aider # + specific editors
    ai-toolkit update --local                         # auto-detects editors
  4. 4DSH has separate project and profile ownership
    # Generic local outputs plus DSH-specific .agents/skills. No DSH_HOME write.
    ai-toolkit install --local --editors dsh
    
    # Explicit profile lifecycle.
    ai-toolkit dsh install --profile web
    ai-toolkit dsh update --profile web
    ai-toolkit dsh doctor --profile web
    ai-toolkit dsh uninstall --profile web --yes
  5. 5Run
    ai-toolkit plugin list                            # show available packs
    ai-toolkit plugin install --editor all --all      # install all for Claude Code + Codex
    ai-toolkit plugin status --editor all             # show what's installed
  6. 6The Claude app does not read Claude Code's ~/.claude/rules/ or CLAUDE.md. Export and…
    ai-toolkit claude-app export --verify
    # Claude > Customize > Plugins > + > Upload plugin
    # Paste the generated *-global-instructions.md into:
    # Settings > Cowork > Global instructions

README

ai-toolkit

AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling. DSH is available as a separate explicit developer-preview target.

CI License: Apache 2.0 Skills Agents Tests

What's New in v4.34.1

  • Working MCP URLs: native editor configs receive resolved endpoint addresses from ${NAME} and ${NAME:-default} template expressions.
  • Local template refresh: ai-toolkit update re-reads registered local MCP templates, repairing stale generated configuration such as rag-mcp-legal.
  • Source preservation: portable templates, credential placeholders, unrelated settings and missing-source configurations remain intact.

See CHANGELOG.md for full history.

Table of Contents


Install

Requirements: Node.js >= 18 and Python >= 3.11.

macOS: /usr/bin/python3 is Python 3.9 and will not run the toolkit. Install a supported one with brew install python@3.13 and make sure which python3 no longer points at /usr/bin/python3.

# Option A: install globally (once per machine)
npm install -g @softspark/ai-toolkit
ai-toolkit install

# Option B: try without installing (npx)
npx @softspark/ai-toolkit install

That's it. Claude Code picks up 116 skills, 44 agents, quality hooks, and the safety constitution automatically.

Language knowledge skills (rust-rules, kotlin-patterns, ...) are scoped to the languages your registered projects use: once you have run ai-toolkit install --local in at least one project, the global install turns the other languages' skills off through skillOverrides in ~/.claude/settings.json so their descriptions stop loading into every session. A new project in a new language turns its skills back on. ai-toolkit install --language-skills all keeps every language skill on and remembers that choice; ai-toolkit doctor shows the resulting context budget.

Windows: WSL is the recommended runtime. Native Windows works when Git Bash is available for hook scripts; dependency hints cover winget, Chocolatey, and Scoop. See Windows Support.

Update

npm install -g @softspark/ai-toolkit@latest && ai-toolkit update

Per-Project Setup

cd your-project/
ai-toolkit install --local                        # Claude Code only
ai-toolkit install --local --editors all          # + all editors
ai-toolkit install --local --editors cursor,aider # + specific editors
ai-toolkit update --local                         # auto-detects editors

DSH Developer Preview

DSH has separate project and profile ownership:

# Generic local outputs plus DSH-specific .agents/skills. No DSH_HOME write.
ai-toolkit install --local --editors dsh

# Explicit profile lifecycle.
ai-toolkit dsh install --profile web
ai-toolkit dsh update --profile web
ai-toolkit dsh doctor --profile web
ai-toolkit dsh uninstall --profile web --yes

DSH is excluded from --editors all, auto-detection, and defaults. Its only DSH-specific project output is .agents/skills; the normal --local Claude files, detected language rules, and other generic project outputs still apply. Project and profile --dry-run commands are read-only. The lifecycle targets DSH 0.1.2-rc.1, @softspark/dsh-codex@1.5.0, and @softspark/dsh-orchestrator@2.0.0. Update the DSH runtime before updating this profile integration. Codex, Claude Code, and GitHub Copilot own their logins. ai-toolkit accepts no provider API keys, and GitHub AI credits apply to the Copilot Gemini route. See DSH Compatibility for the exact contract and version-specific qualification evidence.

Plugin Management

ai-toolkit plugin list                            # show available packs
ai-toolkit plugin install --editor all --all      # install all for Claude Code + Codex
ai-toolkit plugin status --editor all             # show what's installed

Claude Chat / Desktop / Cowork

The Claude app does not read Claude Code's ~/.claude/rules/ or CLAUDE.md. Export and upload the app-native plugin instead:

ai-toolkit claude-app export --verify
# Claude > Customize > Plugins > + > Upload plugin
# Paste the generated *-global-instructions.md into:
# Settings > Cowork > Global instructions

Re-export and re-upload after toolkit or registered-rule updates. Skills work in Chat and Cowork; hooks and sub-agents are active only in Cowork.

Native Codex Plugin

Build or validate the marketplace-ready Codex package without changing ~/.agents or ~/.codex:

ai-toolkit codex-plugin export --output ai-toolkit-codex-plugin.zip
ai-toolkit codex-plugin verify

Extract the ZIP into a local marketplace under plugins/ai-toolkit/, add that marketplace with codex plugin marketplace add <marketplace-root>, then install from /plugins in Codex CLI and start a new session. Review and trust the bundled hooks before use. The ZIP includes plugin-local persona definitions, the briefing helper, the skill-audit helper and its local imports, and other referenced skill resources. Export rejects symlinked output paths and ancestors. Codex IDE does not support plugins.

Install Profiles

ai-toolkit install --profile minimal    # agents + skills only
ai-toolkit install --profile standard   # full install (default)
ai-toolkit install --profile strict     # full + git hooks

Verify & Repair

ai-toolkit validate          # check integrity
ai-toolkit doctor --fix      # auto-repair

See CLI Reference for all commands and options.


Platform Support

PlatformConfig FilesHooksScope
Claude Code~/.claude/agents, ~/.claude/skills, ~/.claude/rules/*.md, ~/.claude/settings.jsonglobal
Claude Chat / Coworkuploaded plugin ZIP + UI global/folder instructions + claude_desktop_config.json (MCP)Cowork onlyaccount/app
Cursor.cursor/rules/*.mdc + .cursor/mcp.json + .cursor/skills/*project (~/.cursor/mcp.json for MCP only)
Windsurf (Devin Desktop)~/.config/devin/AGENTS.md + .devin/rules/*.md + .devin/hooks.v1.json + .windsurf/skills/*global + project
Gemini CLI~/.gemini/GEMINI.md + .gemini/settings.json + .gemini/{commands,skills,agents}/project + user
GitHub CopilotProject: AGENTS.md + .github/copilot-instructions.md + .github/{instructions,prompts,agents,skills,hooks}/ + .github/mcp.json; user: $COPILOT_HOME/copilot-instructions.md + $COPILOT_HOME/{instructions,agents,skills,hooks}/ + $COPILOT_HOME/mcp-config.jsonproject + user
ClineProject: .cline/{rules,hooks,skills}/ + .clinerules/{hooks,workflows}/; user: ~/.cline/{rules,hooks,skills}/ + ~/Documents/Cline/{Rules,Hooks}/ compatibilityglobal + project
Roo Code / Zoo Code~/.roo/rules/*.md + .roomodes + .roo/rules/*.mdglobal rules + project
Aider~/.aider.conf.yml + .aider.conf.yml + CONVENTIONS.mdglobal + project
Augment~/.augment/rules/*.md + .augment/rules/ai-toolkit-*.mdglobal + project
Google AntigravityProject .agents/{rules,workflows,skills,agents,hooks}/; user ~/.gemini/config/{skills,agents,hooks}/; opt-in native plugin exportproject + user
Codex CLIProject: AGENTS.md + .agents/skills/* + .codex/{agents,hooks}/ + .codex/{hooks.json,config.toml}; user: $CODEX_HOME/{AGENTS.md,agents,hooks.json,config.toml} + $HOME/.agents/skills/*project + user
opencodeAGENTS.md + .opencode/{agents,commands,plugins,skills}/* + opencode.{json,jsonc}project + global (~/.config/opencode/)
DeepSeek HarnessProject .agents/skills/*; explicit profile packages and $DSH_HOME/.agent-presets/softspark-orchestratorno bridgeproject + explicit named profile

Claude Code is always installed (primary platform). Other editors are selected with --editors; the Claude app uses the separate claude-app export flow because its customization store is UI/plugin-managed, except for MCP servers, which ai-toolkit mcp install --editor claude-app --scope global writes straight to claude_desktop_config.json. The Hooks column marks platforms with lifecycle enforcement. Platforms marked — receive guidance without blocking hooks.


What You Get

ComponentCountDescription
skills/ (task)32Slash commands: /commit, /build, /deploy, /test, /mcp-builder, ...
skills/ (hybrid)33Slash commands with agent knowledge base
skills/ (knowledge)51Domain knowledge auto-loaded by agents (includes 13 <lang>-rules skills)
agents/44Specialized agents across 10 categories
hooks/28 entries / 14 events + statusLineQuality gates, path safety, prompt governance, loop guard, session lifecycle
plugins/2 packsOpt-in packs that install files of their own (memory, enterprise)
constitution.md7 articlesMachine-enforced safety rules
rules/auto-syncedGlobal/project rule files for Claude and other editors
kb/reference docsArchitecture, procedures, and best practices

Architecture

ai-toolkit/
├── app/
│   ├── agents/          # 44 agent definitions
│   ├── skills/          # 116 skills (task / hybrid / knowledge)
│   ├── rules/           # Source rules synced into Claude/editor rule files
│   ├── hooks/           # Hook scripts (28 entries, 14 lifecycle events)
│   ├── claude-app/      # Generated Chat/Cowork plugin rules, hooks, instructions
│   ├── plugins/         # 2 experimental plugin packs (opt-in)
│   ├── output-styles/   # System prompt output style overrides
│   ├── constitution.md  # 7 immutable safety articles
│   └── ARCHITECTURE.md  # Full system design
├── kb/                  # Reference docs, procedures, plans
├── scripts/             # Validation, install, evaluation scripts
├── tests/               # Bats and Python test suite
└── CHANGELOG.md

Distribution: Symlink-based for agents/skills, copy-based for hooks. Run ai-toolkit update after npm install — all projects pick up changes instantly. See Distribution Model.


Key Features

Machine-enforced constitution — 7-article safety constitution enforced via PreToolUse hooks that actually block rm -rf, DROP TABLE, and irreversible operations. Not just documentation.

28 lifecycle hook entries: Executable handlers across 14 events (SessionStart → SessionEnd, plus InstructionsLoaded + ConfigChange). Guards, governance, quality gates, session persistence, MCP health checks, revert protection, test-cohesion enforcement, loop guard, and search-first discipline. See Hooks Catalog.

Security scanning/skill-audit for code-level risks, /cve-scan for dependency CVEs. Both CI-ready with exit codes.

Iron Law enforcement/tdd, debugging-tactics, and verification-before-completion enforce non-negotiable gates with anti-rationalization tables. 15 skills total include rationalization resistance.

Multi-language quality gatesStop hook runs lint + type checks across Python, TypeScript, PHP, Dart, Go after every response.

Agent verification checklists — 10 agents include exit criteria that must be met before presenting results.

Two-stage review/subagent-development runs Implementer → Spec Review → Quality Review per task.

Persistent memorymemory-pack plugin: SQLite + FTS5 search across past sessions.

Local product telemetryai-toolkit stats --summary reports total invocations, skill coverage, unused catalog skills, recent activity, and top skills from local usage data.

Persona presets — 4 roles (backend-lead, frontend-lead, devops-eng, junior-dev) adjust style and priorities.

Config inheritance — Enterprise extends system with constitution immutability and enforcement constraints. See Enterprise Config Guide.

70 language rules — 13 languages + common, 5 categories each. Auto-detected or explicit --lang. See Language Rules.

28 MCP templates — Ready-to-use configs for GitHub, PostgreSQL, Slack, Jira, Sentry, general RAG, and Polish legal RAG. See MCP Templates.

See Unique Features for detailed descriptions of all differentiators.


Key Slash Commands

CommandPurposeEffort
/workflow <type>Pre-defined multi-agent workflow (16 types)max
/autonomous-devTask-to-PR delivery with persistent state, review, QA and resumehigh
/prepare-test-envPrepare and verify the running app used by QAhigh
/orchestrateCustom multi-agent coordination (3–6 agents)max
/swarmParallel Agent Teams: map-reduce, consensus, relaymax
/planImplementation plan with task breakdownhigh
/reviewCode review: quality, security, performancehigh
/debugSystematic debugging with diagnosticsmedium
/refactorSafe refactoring with pattern analysishigh
/tddTest-driven development with red-green-refactorhigh
/commitStructured commit with lintingmedium
/prPull request with generated checklistmedium
/docsGenerate README, API docs, architecture noteshigh
/exploreInteractive codebase visualizationmedium
/write-a-prdCreate PRD through interactive interviewhigh
/prd-to-planConvert PRD into vertical-slice implementation planhigh
/design-an-interfaceGenerate 3+ radically different interface designshigh
/grill-meStress-test a plan through Socratic questioningmedium
/triage-issueTriage bug with deep investigation and TDD fix planhigh
/architecture-auditDiscover shallow modules, propose refactorshigh
/council4-perspective decision evaluationhigh
/cve-scanScan dependencies for known CVEsmedium
/skill-auditScan skills/agents for security risksmedium
/repeatAutonomous loop with safety controlsmedium
/personaSwitch engineering persona at runtimelow

/workflow Types

feature-development    backend-feature       frontend-feature
api-design             database-evolution    test-coverage
security-audit         codebase-onboarding   spike
debugging              incident-response     performance-optimization
infrastructure-change  application-deploy    proactive-troubleshooting
autonomous-development

Multi-Agent Skill Selection

Need multi-agent coordination?
├── Know your domains? → /orchestrate (ad-hoc, 3-6 agents)
├── Have a known pattern? → /workflow <type> (16 routes)
├── Need task-to-PR delivery with resume? → /autonomous-dev
├── Need consensus/map-reduce? → /swarm <mode>
├── Want Agent Teams API? → /teams (experimental)
└── Executing a plan? → /subagent-development

Autonomous software delivery

/autonomous-dev setup
/autonomous-dev run "Add CSV export for filtered orders"
/autonomous-dev run PROJ-123
/autonomous-dev list
/autonomous-dev resume <run-id>
/autonomous-dev status <run-id>

The process takes a brief, specification, issue or existing PR through planning, implementation, project-specific validation, review, application QA and required CI. It reuses the same PR and resumes from durable state. The default endpoint is a ready PR; merge and deployment need separate authorization.

The current agent host performs the work. Bundled Python helpers maintain a transactional run journal and check QA environment identity/readiness. They do not launch an LLM or continue running after the host stops. Generated reports stay outside the target repository, while .ai-toolkit/autonomous.json records intentional project configuration. See the autonomous development guide for setup, ownership, recovery, evidence and supported runtime boundaries.

The optional SoftSpark stack profile separates Jira task tracking, code-host PR/CI and RAG knowledge. It refreshes task requirements and source-backed KB context on resume, reconciles Jira comment receipts before retries and treats Jira completion and KB indexing as explicit project lifecycle outcomes.

Getting Started

  1. Customize CLAUDE.md — add your project's tech stack, commands, and conventions at the top (above toolkit markers).

  2. Start using skills:

    /onboard     # guided setup interview
    /explore     # understand your codebase
    /plan        # plan a feature
    
  3. Verify your install:

    ai-toolkit validate
    

Documentation

TopicLink
CLI Referencekb/reference/cli-reference.md
Unique Featureskb/reference/unique-features.md
Architecture Overviewkb/reference/architecture-overview.md
Hooks Catalogkb/reference/hooks-catalog.md
Language Ruleskb/reference/language-rules.md
MCP Templateskb/reference/mcp-templates.md
Extension APIkb/reference/extension-api.md
Manifest Installkb/reference/manifest-install.md
Plugin Packskb/reference/plugin-pack-conventions.md
Enterprise Configkb/reference/enterprise-config-guide.md
Distribution Modelkb/reference/distribution-model.md
Ecosystem Comparisonkb/reference/comparison.md
Codex CLI Compatibilitykb/reference/codex-cli-compatibility.md
opencode Compatibilitykb/reference/opencode-compatibility.md
GitHub Copilot Compatibilitykb/reference/copilot-compatibility.md
DSH Compatibilitykb/reference/dsh-compatibility.md
Maintenance SOPkb/procedures/sop-maintenance.md

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md for responsible disclosure policy.

License

Apache License 2.0 — see LICENSE and NOTICE.

Fork it, modify it, ship it commercially. Three things the licence asks in return:

  • Keep the attribution. Redistributions must carry the contents of NOTICE (§4d) — that is where the project name, copyright and source URL live.
  • Say what you changed. Modified files must carry a prominent notice stating that you changed them (§4b).
  • Names are not included. The licence grants no rights to the "ai-toolkit" or "SoftSpark" names or marks (§6).

Releases up to and including v4.20.0 were published under MIT and stay available under MIT; the change applies going forward and revokes nothing already granted. Contributions received while the project was MIT-licensed remain their authors' copyright and are redistributed under Apache 2.0 with the original MIT notice preserved in NOTICE, as MIT requires.

Changelog

See CHANGELOG.md.


Extracted from production use at SoftSpark. Built to be the toolkit we wished existed.

Files in the repo

Repository payload31 top-level entries
  • .github
  • app
  • assets
  • benchmarks
  • bin
  • kb
  • scripts
  • tests
  • .gitattributes
  • .gitignore
  • .hipaaignore
  • .npmignore
  • .npmrc
  • action.yml
  • BACKWARD_COMPATIBILITY.md
  • CHANGELOG.md
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • DECISIONS.md
  • LICENSE
  • llms-full.txt
  • llms.txt
  • manifest.json
  • mypy.ini
  • NOTICE
  • package-lock.json
  • package.json
  • pytest.ini
  • README.md
  • requirements-dev.txt
  • SECURITY.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k