@amsterdamdatalabs/enact-extensions 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -21
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +171 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +402 -49
- package/dist/install.js.map +1 -1
- package/dist/internal/codex.d.ts.map +1 -1
- package/dist/internal/codex.js +7 -1
- package/dist/internal/codex.js.map +1 -1
- package/dist/internal/platform.d.ts +8 -0
- package/dist/internal/platform.d.ts.map +1 -1
- package/dist/internal/platform.js +46 -2
- package/dist/internal/platform.js.map +1 -1
- package/dist/provision.d.ts +30 -0
- package/dist/provision.d.ts.map +1 -0
- package/dist/provision.js +202 -0
- package/dist/provision.js.map +1 -0
- package/dist/validate/index.d.ts +44 -0
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +157 -0
- package/dist/validate/index.js.map +1 -1
- package/extensions/cmux/.agents/plugin.json +37 -0
- package/extensions/cmux/skills/cmux/SKILL.md +82 -0
- package/extensions/cmux/skills/cmux/agents/openai.yaml +4 -0
- package/extensions/cmux/skills/cmux/references/handles-and-identify.md +35 -0
- package/extensions/cmux/skills/cmux/references/panes-surfaces.md +37 -0
- package/extensions/cmux/skills/cmux/references/trigger-flash-and-health.md +23 -0
- package/extensions/cmux/skills/cmux/references/windows-workspaces.md +31 -0
- package/extensions/cmux/skills/cmux-vm-monitor/SKILL.md +122 -0
- package/extensions/cmux/skills/cmux-vm-monitor/agents/openai.yaml +4 -0
- package/extensions/cmux/skills/cmux-vm-monitor/references/cmux-commands.md +66 -0
- package/extensions/cmux/skills/cmux-vm-monitor/scripts/codex_vm_monitor.sh +45 -0
- package/extensions/cmux/skills/cmux-workspace/SKILL.md +93 -0
- package/extensions/dev-state/.agents/plugin.json +35 -0
- package/extensions/dev-state/skills/dev-state-plan-graduation/SKILL.md +194 -0
- package/extensions/dev-state/skills/dev-state-plan-graduation/agents/openai.yaml +4 -0
- package/extensions/dev-state/skills/dev-state-plan-graduation/references/reference.md +130 -0
- package/extensions/devops/.agents/plugin.json +36 -0
- package/extensions/devops/skills/azure-devops-cli/SKILL.md +431 -0
- package/extensions/devops/skills/azure-devops-cli/agents/openai.yaml +4 -0
- package/extensions/devops/skills/ci-pipeline-strategy/SKILL.md +217 -0
- package/extensions/devops/skills/ci-pipeline-strategy/agents/openai.yaml +4 -0
- package/extensions/enact-context/.agents/plugin.json +40 -0
- package/extensions/enact-context/.mcp.json +8 -0
- package/extensions/enact-context/README.md +25 -0
- package/extensions/enact-context/assets/icon.png +0 -0
- package/extensions/enact-context/assets/logo.png +0 -0
- package/extensions/enact-context/hooks/hooks.json +115 -0
- package/extensions/enact-context/skills/enact-context/SKILL.md +149 -0
- package/extensions/enact-context/skills/enact-context/scripts/install.sh +69 -0
- package/extensions/enact-factory/.agents/plugin.json +42 -0
- package/extensions/enact-factory/.mcp.json +8 -0
- package/extensions/enact-factory/assets/icon.png +0 -0
- package/extensions/enact-factory/assets/logo.png +0 -0
- package/extensions/enact-factory/hooks/user-prompt-submit.mjs +67 -0
- package/extensions/enact-factory/skills/testing-strategy/SKILL.md +167 -0
- package/extensions/enact-factory/skills/workitem-triage/SKILL.md +22 -0
- package/extensions/enact-operator/.agents/plugin.json +57 -0
- package/extensions/enact-operator/.app.json +3 -0
- package/extensions/enact-operator/.mcp.json +10 -0
- package/extensions/enact-operator/_taxonomy.md +86 -0
- package/extensions/enact-operator/agents/README.md +5 -0
- package/extensions/enact-operator/agents/architect.toml +25 -0
- package/extensions/enact-operator/agents/code-reviewer.toml +24 -0
- package/extensions/enact-operator/agents/critic.toml +30 -0
- package/extensions/enact-operator/agents/executor.toml +24 -0
- package/extensions/enact-operator/agents/explore.toml +23 -0
- package/extensions/enact-operator/agents/planner.toml +24 -0
- package/extensions/enact-operator/agents/verifier.toml +24 -0
- package/extensions/enact-operator/assets/icon.png +0 -0
- package/extensions/enact-operator/assets/logo.png +0 -0
- package/extensions/enact-operator/commands/doctor.md +39 -0
- package/extensions/enact-operator/commands/setup.md +51 -0
- package/extensions/enact-operator/hooks/hooks.json +146 -0
- package/extensions/enact-operator/skills/_variants.md +44 -0
- package/extensions/enact-operator/skills/ai-slop-cleaner/SKILL.md +50 -0
- package/extensions/enact-operator/skills/analyze/SKILL.md +91 -0
- package/extensions/enact-operator/skills/ask/SKILL.md +47 -0
- package/extensions/enact-operator/skills/autopilot/SKILL.md +170 -0
- package/extensions/enact-operator/skills/autoresearch-goal/SKILL.md +79 -0
- package/extensions/enact-operator/skills/cancel/SKILL.md +99 -0
- package/extensions/enact-operator/skills/configure-notifications/SKILL.md +77 -0
- package/extensions/enact-operator/skills/deep-interview/SKILL.md +80 -0
- package/extensions/enact-operator/skills/doctor/SKILL.md +48 -0
- package/extensions/enact-operator/skills/hud/SKILL.md +49 -0
- package/extensions/enact-operator/skills/hyperplan/SKILL.md +47 -0
- package/extensions/enact-operator/skills/plan/SKILL.md +78 -0
- package/extensions/enact-operator/skills/ralph/SKILL.md +201 -0
- package/extensions/enact-operator/skills/ralph/gemini.md +18 -0
- package/extensions/enact-operator/skills/ralplan/SKILL.md +151 -0
- package/extensions/enact-operator/skills/remove-deadcode/SKILL.md +45 -0
- package/extensions/enact-operator/skills/research/SKILL.md +74 -0
- package/extensions/enact-operator/skills/review/SKILL.md +58 -0
- package/extensions/enact-operator/skills/security-research/SKILL.md +54 -0
- package/extensions/enact-operator/skills/setup/SKILL.md +91 -0
- package/extensions/enact-operator/skills/setup/scripts/install.sh +50 -0
- package/extensions/enact-operator/skills/skill/SKILL.md +82 -0
- package/extensions/enact-operator/skills/tdd/SKILL.md +59 -0
- package/extensions/enact-operator/skills/team/SKILL.md +199 -0
- package/extensions/enact-operator/skills/trace/SKILL.md +41 -0
- package/extensions/enact-operator/skills/ultragoal/SKILL.md +99 -0
- package/extensions/enact-operator/skills/ultraqa/SKILL.md +113 -0
- package/extensions/enact-operator/skills/ultrawork/SKILL.md +145 -0
- package/extensions/enact-operator/skills/ultrawork/planner.md +28 -0
- package/extensions/enact-operator/skills/wiki/SKILL.md +41 -0
- package/extensions/enact-operator/skills/work-with-workitem/SKILL.md +51 -0
- package/extensions/enact-wiki/.agents/plugin.json +42 -0
- package/extensions/enact-wiki/.mcp.json +15 -0
- package/extensions/enact-wiki/README.md +44 -0
- package/extensions/enact-wiki/assets/icon.png +0 -0
- package/extensions/enact-wiki/assets/logo.png +0 -0
- package/extensions/enact-wiki/skills/document-parser/SKILL.md +17 -0
- package/extensions/enact-wiki/skills/document-parser/scripts/parse.sh +60 -0
- package/extensions/enact-wiki/skills/document-parser/skill.json +9 -0
- package/extensions/enact-wiki/skills/enact-wiki/SKILL.md +30 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/ingest.md +62 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/manage.md +34 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/query.md +59 -0
- package/extensions/enact-wiki/skills/search-lab/SKILL.md +57 -0
- package/extensions/enact-wiki/skills/search-lab/scripts/analyze.ts +23 -0
- package/{plugins/net-revenue-management/.codex-plugin → extensions/net-revenue-management/.agents}/plugin.json +10 -6
- package/extensions/plugin-dev/.agents/plugin.json +42 -0
- package/extensions/plugin-dev/.mcp.json +3 -0
- package/extensions/plugin-dev/agents/agent-creator.md +199 -0
- package/extensions/plugin-dev/agents/plugin-validator.md +91 -0
- package/extensions/plugin-dev/agents/skill-reviewer.md +212 -0
- package/extensions/plugin-dev/commands/_archive/create-marketplace.md +427 -0
- package/extensions/plugin-dev/commands/_archive/plugin-dev-guide.md +12 -0
- package/extensions/plugin-dev/commands/create-plugin.md +498 -0
- package/extensions/plugin-dev/commands/start.md +81 -0
- package/extensions/plugin-dev/hooks/hooks.json +3 -0
- package/extensions/plugin-dev/skills/agent-development/SKILL.md +641 -0
- package/extensions/plugin-dev/skills/agent-development/examples/agent-creation-prompt.md +250 -0
- package/extensions/plugin-dev/skills/agent-development/examples/complete-agent-examples.md +461 -0
- package/extensions/plugin-dev/skills/agent-development/references/advanced-agent-fields.md +246 -0
- package/extensions/plugin-dev/skills/agent-development/references/agent-creation-system-prompt.md +216 -0
- package/extensions/plugin-dev/skills/agent-development/references/permission-modes-rules.md +226 -0
- package/extensions/plugin-dev/skills/agent-development/references/system-prompt-design.md +464 -0
- package/extensions/plugin-dev/skills/agent-development/references/triggering-examples.md +474 -0
- package/extensions/plugin-dev/skills/agent-development/scripts/create-agent-skeleton.sh +176 -0
- package/extensions/plugin-dev/skills/agent-development/scripts/test-agent-trigger.sh +227 -0
- package/extensions/plugin-dev/skills/agent-development/scripts/validate-agent.sh +227 -0
- package/extensions/plugin-dev/skills/command-development/SKILL.md +763 -0
- package/extensions/plugin-dev/skills/command-development/examples/plugin-commands.md +612 -0
- package/extensions/plugin-dev/skills/command-development/examples/simple-commands.md +527 -0
- package/extensions/plugin-dev/skills/command-development/references/advanced-workflows.md +762 -0
- package/extensions/plugin-dev/skills/command-development/references/documentation-patterns.md +769 -0
- package/extensions/plugin-dev/skills/command-development/references/frontmatter-reference.md +508 -0
- package/extensions/plugin-dev/skills/command-development/references/interactive-commands.md +966 -0
- package/extensions/plugin-dev/skills/command-development/references/marketplace-considerations.md +943 -0
- package/extensions/plugin-dev/skills/command-development/references/plugin-features-reference.md +637 -0
- package/extensions/plugin-dev/skills/command-development/references/plugin-integration.md +191 -0
- package/extensions/plugin-dev/skills/command-development/references/skill-tool.md +447 -0
- package/extensions/plugin-dev/skills/command-development/references/testing-strategies.md +723 -0
- package/extensions/plugin-dev/skills/command-development/scripts/check-frontmatter.sh +234 -0
- package/extensions/plugin-dev/skills/command-development/scripts/validate-command.sh +160 -0
- package/extensions/plugin-dev/skills/hook-development/SKILL.md +861 -0
- package/extensions/plugin-dev/skills/hook-development/examples/load-context.sh +55 -0
- package/extensions/plugin-dev/skills/hook-development/examples/validate-bash.sh +57 -0
- package/extensions/plugin-dev/skills/hook-development/examples/validate-write.sh +48 -0
- package/extensions/plugin-dev/skills/hook-development/references/advanced.md +871 -0
- package/extensions/plugin-dev/skills/hook-development/references/hook-input-schemas.md +145 -0
- package/extensions/plugin-dev/skills/hook-development/references/migration.md +392 -0
- package/extensions/plugin-dev/skills/hook-development/references/patterns.md +430 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/README.md +181 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/hook-linter.sh +153 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/test-hook.sh +276 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/validate-hook-schema.sh +159 -0
- package/extensions/plugin-dev/skills/mcp-integration/SKILL.md +775 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/http-server.json +20 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/sse-server.json +19 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/stdio-server.json +38 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/ws-server.json +26 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/authentication.md +601 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/server-discovery.md +190 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/server-types.md +572 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/tool-usage.md +623 -0
- package/extensions/plugin-dev/skills/plugin-dev-guide/SKILL.md +222 -0
- package/extensions/plugin-dev/skills/plugin-structure/SKILL.md +705 -0
- package/extensions/plugin-dev/skills/plugin-structure/examples/advanced-plugin.md +774 -0
- package/extensions/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md +83 -0
- package/extensions/plugin-dev/skills/plugin-structure/examples/standard-plugin.md +611 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/advanced-topics.md +289 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/component-patterns.md +592 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/github-actions.md +233 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/headless-ci-mode.md +193 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/manifest-reference.md +625 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/output-styles.md +116 -0
- package/extensions/plugin-dev/skills/skill-development/SKILL.md +564 -0
- package/extensions/plugin-dev/skills/skill-development/examples/complete-skill.md +465 -0
- package/extensions/plugin-dev/skills/skill-development/examples/frontmatter-templates.md +167 -0
- package/extensions/plugin-dev/skills/skill-development/examples/minimal-skill.md +111 -0
- package/extensions/plugin-dev/skills/skill-development/references/advanced-frontmatter.md +225 -0
- package/extensions/plugin-dev/skills/skill-development/references/commands-vs-skills.md +39 -0
- package/extensions/plugin-dev/skills/skill-development/references/skill-creation-workflow.md +379 -0
- package/extensions/plugin-dev/skills/skill-development/references/skill-creator-original.md +210 -0
- package/package.json +8 -11
- package/scripts/enact-extensions.mjs +823 -21
- package/scripts/hooks/session-start-drift-check.mjs +58 -0
- package/scripts/lib/build-index.mjs +50 -0
- package/scripts/lib/bundle-hash.mjs +137 -0
- package/scripts/lib/hooks.mjs +741 -0
- package/scripts/lib/ledger.mjs +163 -0
- package/scripts/lib/list-bundles.mjs +70 -0
- package/scripts/lib/outdated.mjs +144 -0
- package/scripts/lib/provision-mcp.mjs +16 -0
- package/scripts/lib/resolve-bundle.mjs +121 -0
- package/scripts/lib/run-install.mjs +402 -38
- package/scripts/lib/run-prune.mjs +73 -0
- package/scripts/lib/run-sync.mjs +9 -1
- package/scripts/lib/run-uninstall.mjs +244 -0
- package/scripts/lib/run-update.mjs +152 -0
- package/scripts/lib/run-validate.mjs +21 -18
- package/scripts/lib/serve.mjs +472 -0
- package/scripts/postinstall.mjs +63 -0
- package/scripts/setup-enact-context.sh +2 -2
- package/scripts/version-bump.sh +463 -0
- package/spec/codex.json +1 -11
- package/spec/index.json +59 -0
- package/web/assets/README.md +111 -0
- package/web/assets/logo-full.png +0 -0
- package/web/assets/logo-slim.png +0 -0
- package/web/assets/tokens/base.css +45 -0
- package/web/assets/tokens/colors.css +248 -0
- package/web/assets/tokens/effects.css +24 -0
- package/web/assets/tokens/fonts.css +8 -0
- package/web/assets/tokens/index.css +18 -0
- package/web/assets/tokens/spacing.css +50 -0
- package/web/index.html +1188 -0
- package/.agents/plugins/marketplace.json +0 -20
- package/catalog/enact-context.json +0 -9
- package/catalog/enact-factory.json +0 -7
- package/catalog/enact-operator.json +0 -7
- package/catalog/enact-wiki.json +0 -7
- package/catalog/net-revenue-management.json +0 -8
- package/scripts/rename-supervisor-to-operator.pl +0 -66
- package/scripts/sync-manifests.mjs +0 -23
- package/scripts/validate-catalog.mjs +0 -37
- package/scripts/validate-plugin.mjs +0 -10
- /package/{plugins → extensions}/net-revenue-management/.mcp.json +0 -0
- /package/{plugins → extensions}/net-revenue-management/skills/net-revenue-risks/SKILL.md +0 -0
- /package/{plugins → extensions}/net-revenue-management/skills/net-revenue-scenario/SKILL.md +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Minimal Plugin Example
|
|
2
|
+
|
|
3
|
+
A bare-bones plugin with a single command.
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
hello-world/
|
|
9
|
+
├── .claude-plugin/
|
|
10
|
+
│ └── plugin.json
|
|
11
|
+
└── commands/
|
|
12
|
+
└── hello.md
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## File Contents
|
|
16
|
+
|
|
17
|
+
### .claude-plugin/plugin.json
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"name": "hello-world"
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### commands/hello.md
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
---
|
|
29
|
+
name: hello
|
|
30
|
+
description: Prints a friendly greeting message
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# Hello Command
|
|
34
|
+
|
|
35
|
+
Print a friendly greeting to the user.
|
|
36
|
+
|
|
37
|
+
## Implementation
|
|
38
|
+
|
|
39
|
+
Output the following message to the user:
|
|
40
|
+
|
|
41
|
+
> Hello! This is a simple command from the hello-world plugin.
|
|
42
|
+
>
|
|
43
|
+
> Use this as a starting point for building more complex plugins.
|
|
44
|
+
|
|
45
|
+
Include the current timestamp in the greeting to show the command executed successfully.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
After installing the plugin:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
$ claude
|
|
54
|
+
> /hello
|
|
55
|
+
Hello! This is a simple command from the hello-world plugin.
|
|
56
|
+
|
|
57
|
+
Use this as a starting point for building more complex plugins.
|
|
58
|
+
|
|
59
|
+
Executed at: 2025-01-15 14:30:22 UTC
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Key Points
|
|
63
|
+
|
|
64
|
+
1. **Minimal manifest**: Only the required `name` field
|
|
65
|
+
2. **Single command**: One markdown file in `commands/` directory
|
|
66
|
+
3. **Auto-discovery**: Claude Code finds the command automatically
|
|
67
|
+
4. **No dependencies**: No scripts, hooks, or external resources
|
|
68
|
+
|
|
69
|
+
## When to Use This Pattern
|
|
70
|
+
|
|
71
|
+
- Quick prototypes
|
|
72
|
+
- Single-purpose utilities
|
|
73
|
+
- Learning plugin development
|
|
74
|
+
- Internal team tools with one specific function
|
|
75
|
+
|
|
76
|
+
## Extending This Plugin
|
|
77
|
+
|
|
78
|
+
To add more functionality:
|
|
79
|
+
|
|
80
|
+
1. **Add commands**: Create more `.md` files in `commands/`
|
|
81
|
+
2. **Add metadata**: Update `plugin.json` with version, description, author
|
|
82
|
+
3. **Add agents**: Create `agents/` directory with agent definitions
|
|
83
|
+
4. **Add hooks**: Create `hooks/hooks.json` for event handling
|
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
# Standard Plugin Example
|
|
2
|
+
|
|
3
|
+
A well-structured plugin with commands, agents, and skills.
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
code-quality/
|
|
9
|
+
├── .claude-plugin/
|
|
10
|
+
│ └── plugin.json
|
|
11
|
+
├── commands/
|
|
12
|
+
│ ├── lint.md
|
|
13
|
+
│ ├── test.md
|
|
14
|
+
│ └── review.md
|
|
15
|
+
├── agents/
|
|
16
|
+
│ ├── code-reviewer.md
|
|
17
|
+
│ └── test-generator.md
|
|
18
|
+
├── skills/
|
|
19
|
+
│ ├── code-standards/
|
|
20
|
+
│ │ ├── SKILL.md
|
|
21
|
+
│ │ └── references/
|
|
22
|
+
│ │ └── style-guide.md
|
|
23
|
+
│ └── testing-patterns/
|
|
24
|
+
│ ├── SKILL.md
|
|
25
|
+
│ └── examples/
|
|
26
|
+
│ ├── unit-test.js
|
|
27
|
+
│ └── integration-test.js
|
|
28
|
+
├── hooks/
|
|
29
|
+
│ ├── hooks.json
|
|
30
|
+
│ └── scripts/
|
|
31
|
+
│ └── validate-commit.sh
|
|
32
|
+
└── scripts/
|
|
33
|
+
├── run-linter.sh
|
|
34
|
+
└── generate-report.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## File Contents
|
|
38
|
+
|
|
39
|
+
### .claude-plugin/plugin.json
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"name": "code-quality",
|
|
44
|
+
"version": "1.0.0",
|
|
45
|
+
"description": "Comprehensive code quality tools including linting, testing, and review automation",
|
|
46
|
+
"author": {
|
|
47
|
+
"name": "Quality Team",
|
|
48
|
+
"email": "quality@example.com"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://docs.example.com/plugins/code-quality",
|
|
51
|
+
"repository": "https://github.com/example/code-quality-plugin",
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"keywords": [
|
|
54
|
+
"code-quality",
|
|
55
|
+
"linting",
|
|
56
|
+
"testing",
|
|
57
|
+
"code-review",
|
|
58
|
+
"automation"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### commands/lint.md
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
---
|
|
67
|
+
name: lint
|
|
68
|
+
description: Run linting checks on the codebase
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
# Lint Command
|
|
72
|
+
|
|
73
|
+
Run comprehensive linting checks on the project codebase.
|
|
74
|
+
|
|
75
|
+
## Process
|
|
76
|
+
|
|
77
|
+
1. Detect project type and installed linters
|
|
78
|
+
2. Run appropriate linters (ESLint, Pylint, RuboCop, etc.)
|
|
79
|
+
3. Collect and format results
|
|
80
|
+
4. Report issues with file locations and severity
|
|
81
|
+
|
|
82
|
+
## Implementation
|
|
83
|
+
|
|
84
|
+
Execute the linting script:
|
|
85
|
+
|
|
86
|
+
\`\`\`bash
|
|
87
|
+
bash ${CLAUDE_PLUGIN_ROOT}/scripts/run-linter.sh
|
|
88
|
+
\`\`\`
|
|
89
|
+
|
|
90
|
+
Parse the output and present issues organized by:
|
|
91
|
+
|
|
92
|
+
- Critical issues (must fix)
|
|
93
|
+
- Warnings (should fix)
|
|
94
|
+
- Style suggestions (optional)
|
|
95
|
+
|
|
96
|
+
For each issue, show:
|
|
97
|
+
|
|
98
|
+
- File path and line number
|
|
99
|
+
- Issue description
|
|
100
|
+
- Suggested fix (if available)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### commands/test.md
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
---
|
|
107
|
+
name: test
|
|
108
|
+
description: Run test suite with coverage reporting
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
# Test Command
|
|
112
|
+
|
|
113
|
+
Execute the project test suite and generate coverage reports.
|
|
114
|
+
|
|
115
|
+
## Process
|
|
116
|
+
|
|
117
|
+
1. Identify test framework (Jest, pytest, RSpec, etc.)
|
|
118
|
+
2. Run all tests
|
|
119
|
+
3. Generate coverage report
|
|
120
|
+
4. Identify untested code
|
|
121
|
+
|
|
122
|
+
## Output
|
|
123
|
+
|
|
124
|
+
Present results in structured format:
|
|
125
|
+
|
|
126
|
+
- Test summary (passed/failed/skipped)
|
|
127
|
+
- Coverage percentage by file
|
|
128
|
+
- Critical untested areas
|
|
129
|
+
- Failed test details
|
|
130
|
+
|
|
131
|
+
## Integration
|
|
132
|
+
|
|
133
|
+
After test completion, offer to:
|
|
134
|
+
|
|
135
|
+
- Fix failing tests
|
|
136
|
+
- Generate tests for untested code (using test-generator agent)
|
|
137
|
+
- Update documentation based on test changes
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### agents/code-reviewer.md
|
|
141
|
+
|
|
142
|
+
```markdown
|
|
143
|
+
---
|
|
144
|
+
description: Expert code reviewer specializing in identifying bugs, security issues, and improvement opportunities
|
|
145
|
+
capabilities:
|
|
146
|
+
- Analyze code for potential bugs and logic errors
|
|
147
|
+
- Identify security vulnerabilities
|
|
148
|
+
- Suggest performance improvements
|
|
149
|
+
- Ensure code follows project standards
|
|
150
|
+
- Review test coverage adequacy
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
# Code Reviewer Agent
|
|
154
|
+
|
|
155
|
+
Specialized agent for comprehensive code review.
|
|
156
|
+
|
|
157
|
+
## Expertise
|
|
158
|
+
|
|
159
|
+
- **Bug detection**: Logic errors, edge cases, error handling
|
|
160
|
+
- **Security analysis**: Injection vulnerabilities, authentication issues, data exposure
|
|
161
|
+
- **Performance**: Algorithm efficiency, resource usage, optimization opportunities
|
|
162
|
+
- **Standards compliance**: Style guide adherence, naming conventions, documentation
|
|
163
|
+
- **Test coverage**: Adequacy of test cases, missing scenarios
|
|
164
|
+
|
|
165
|
+
## Review Process
|
|
166
|
+
|
|
167
|
+
1. **Initial scan**: Quick pass for obvious issues
|
|
168
|
+
2. **Deep analysis**: Line-by-line review of changed code
|
|
169
|
+
3. **Context evaluation**: Check impact on related code
|
|
170
|
+
4. **Best practices**: Compare against project and language standards
|
|
171
|
+
5. **Recommendations**: Prioritized list of improvements
|
|
172
|
+
|
|
173
|
+
## Integration with Skills
|
|
174
|
+
|
|
175
|
+
Automatically loads `code-standards` skill for project-specific guidelines.
|
|
176
|
+
|
|
177
|
+
## Output Format
|
|
178
|
+
|
|
179
|
+
For each file reviewed:
|
|
180
|
+
|
|
181
|
+
- Overall assessment
|
|
182
|
+
- Critical issues (must fix before merge)
|
|
183
|
+
- Important issues (should fix)
|
|
184
|
+
- Suggestions (nice to have)
|
|
185
|
+
- Positive feedback (what was done well)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### agents/test-generator.md
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
---
|
|
192
|
+
description: Generates comprehensive test suites from code analysis
|
|
193
|
+
capabilities:
|
|
194
|
+
- Analyze code structure and logic flow
|
|
195
|
+
- Generate unit tests for functions and methods
|
|
196
|
+
- Create integration tests for modules
|
|
197
|
+
- Design edge case and error condition tests
|
|
198
|
+
- Suggest test fixtures and mocks
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
# Test Generator Agent
|
|
202
|
+
|
|
203
|
+
Specialized agent for generating comprehensive test suites.
|
|
204
|
+
|
|
205
|
+
## Expertise
|
|
206
|
+
|
|
207
|
+
- **Unit testing**: Individual function/method tests
|
|
208
|
+
- **Integration testing**: Module interaction tests
|
|
209
|
+
- **Edge cases**: Boundary conditions, error paths
|
|
210
|
+
- **Test organization**: Proper test structure and naming
|
|
211
|
+
- **Mocking**: Appropriate use of mocks and stubs
|
|
212
|
+
|
|
213
|
+
## Generation Process
|
|
214
|
+
|
|
215
|
+
1. **Code analysis**: Understand function purpose and logic
|
|
216
|
+
2. **Path identification**: Map all execution paths
|
|
217
|
+
3. **Input design**: Create test inputs covering all paths
|
|
218
|
+
4. **Assertion design**: Define expected outputs
|
|
219
|
+
5. **Test generation**: Write tests in project's framework
|
|
220
|
+
|
|
221
|
+
## Integration with Skills
|
|
222
|
+
|
|
223
|
+
Automatically loads `testing-patterns` skill for project-specific test conventions.
|
|
224
|
+
|
|
225
|
+
## Test Quality
|
|
226
|
+
|
|
227
|
+
Generated tests include:
|
|
228
|
+
|
|
229
|
+
- Happy path scenarios
|
|
230
|
+
- Edge cases and boundary conditions
|
|
231
|
+
- Error handling verification
|
|
232
|
+
- Mock data for external dependencies
|
|
233
|
+
- Clear test descriptions
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### skills/code-standards/SKILL.md
|
|
237
|
+
|
|
238
|
+
```markdown
|
|
239
|
+
---
|
|
240
|
+
name: code-standards
|
|
241
|
+
description: This skill should be used when reviewing code, enforcing style guidelines, checking naming conventions, or ensuring code quality standards. Provides project-specific coding standards and best practices.
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
# Code Standards
|
|
245
|
+
|
|
246
|
+
Comprehensive coding standards and best practices for maintaining code quality.
|
|
247
|
+
|
|
248
|
+
## Overview
|
|
249
|
+
|
|
250
|
+
Enforce consistent code quality through standardized conventions for:
|
|
251
|
+
|
|
252
|
+
- Code style and formatting
|
|
253
|
+
- Naming conventions
|
|
254
|
+
- Documentation requirements
|
|
255
|
+
- Error handling patterns
|
|
256
|
+
- Security practices
|
|
257
|
+
|
|
258
|
+
## Style Guidelines
|
|
259
|
+
|
|
260
|
+
### Formatting
|
|
261
|
+
|
|
262
|
+
- **Indentation**: 2 spaces (JavaScript/TypeScript), 4 spaces (Python)
|
|
263
|
+
- **Line length**: Maximum 100 characters
|
|
264
|
+
- **Braces**: Same line for opening brace (K&R style)
|
|
265
|
+
- **Whitespace**: Space after commas, around operators
|
|
266
|
+
|
|
267
|
+
### Naming Conventions
|
|
268
|
+
|
|
269
|
+
- **Variables**: camelCase for JavaScript, snake_case for Python
|
|
270
|
+
- **Functions**: camelCase, descriptive verb-noun pairs
|
|
271
|
+
- **Classes**: PascalCase
|
|
272
|
+
- **Constants**: UPPER_SNAKE_CASE
|
|
273
|
+
- **Files**: kebab-case for modules
|
|
274
|
+
|
|
275
|
+
## Documentation Requirements
|
|
276
|
+
|
|
277
|
+
### Function Documentation
|
|
278
|
+
|
|
279
|
+
Every function must include:
|
|
280
|
+
|
|
281
|
+
- Purpose description
|
|
282
|
+
- Parameter descriptions with types
|
|
283
|
+
- Return value description with type
|
|
284
|
+
- Example usage (for public functions)
|
|
285
|
+
|
|
286
|
+
### Module Documentation
|
|
287
|
+
|
|
288
|
+
Every module must include:
|
|
289
|
+
|
|
290
|
+
- Module purpose
|
|
291
|
+
- Public API overview
|
|
292
|
+
- Usage examples
|
|
293
|
+
- Dependencies
|
|
294
|
+
|
|
295
|
+
## Error Handling
|
|
296
|
+
|
|
297
|
+
### Required Practices
|
|
298
|
+
|
|
299
|
+
- Never swallow errors silently
|
|
300
|
+
- Always log errors with context
|
|
301
|
+
- Use specific error types
|
|
302
|
+
- Provide actionable error messages
|
|
303
|
+
- Clean up resources in finally blocks
|
|
304
|
+
|
|
305
|
+
### Example Pattern
|
|
306
|
+
|
|
307
|
+
\`\`\`javascript
|
|
308
|
+
async function processData(data) {
|
|
309
|
+
try {
|
|
310
|
+
const result = await transform(data)
|
|
311
|
+
return result
|
|
312
|
+
} catch (error) {
|
|
313
|
+
logger.error('Data processing failed', {
|
|
314
|
+
data: sanitize(data),
|
|
315
|
+
error: error.message,
|
|
316
|
+
stack: error.stack
|
|
317
|
+
})
|
|
318
|
+
throw new DataProcessingError('Failed to process data', { cause: error })
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
\`\`\`
|
|
322
|
+
|
|
323
|
+
## Security Practices
|
|
324
|
+
|
|
325
|
+
- Validate all external input
|
|
326
|
+
- Sanitize data before output
|
|
327
|
+
- Use parameterized queries
|
|
328
|
+
- Never log sensitive information
|
|
329
|
+
- Keep dependencies updated
|
|
330
|
+
|
|
331
|
+
## Detailed Guidelines
|
|
332
|
+
|
|
333
|
+
For comprehensive style guides by language, see:
|
|
334
|
+
|
|
335
|
+
- `references/style-guide.md`
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### skills/code-standards/references/style-guide.md
|
|
339
|
+
|
|
340
|
+
```markdown
|
|
341
|
+
# Comprehensive Style Guide
|
|
342
|
+
|
|
343
|
+
Detailed style guidelines for all supported languages.
|
|
344
|
+
|
|
345
|
+
## JavaScript/TypeScript
|
|
346
|
+
|
|
347
|
+
### Variable Declarations
|
|
348
|
+
|
|
349
|
+
Use `const` by default, `let` when reassignment needed, never `var`:
|
|
350
|
+
|
|
351
|
+
\`\`\`javascript
|
|
352
|
+
// Good
|
|
353
|
+
const MAX_RETRIES = 3
|
|
354
|
+
let currentTry = 0
|
|
355
|
+
|
|
356
|
+
// Bad
|
|
357
|
+
var MAX_RETRIES = 3
|
|
358
|
+
\`\`\`
|
|
359
|
+
|
|
360
|
+
### Function Declarations
|
|
361
|
+
|
|
362
|
+
Use function expressions for consistency:
|
|
363
|
+
|
|
364
|
+
\`\`\`javascript
|
|
365
|
+
// Good
|
|
366
|
+
const calculateTotal = (items) => {
|
|
367
|
+
return items.reduce((sum, item) => sum + item.price, 0)
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// Bad (inconsistent style)
|
|
371
|
+
function calculateTotal(items) {
|
|
372
|
+
return items.reduce((sum, item) => sum + item.price, 0)
|
|
373
|
+
}
|
|
374
|
+
\`\`\`
|
|
375
|
+
|
|
376
|
+
### Async/Await
|
|
377
|
+
|
|
378
|
+
Prefer async/await over promise chains:
|
|
379
|
+
|
|
380
|
+
\`\`\`javascript
|
|
381
|
+
// Good
|
|
382
|
+
async function fetchUserData(userId) {
|
|
383
|
+
const user = await db.getUser(userId)
|
|
384
|
+
const orders = await db.getOrders(user.id)
|
|
385
|
+
return { user, orders }
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Bad
|
|
389
|
+
function fetchUserData(userId) {
|
|
390
|
+
return db.getUser(userId)
|
|
391
|
+
.then(user => db.getOrders(user.id)
|
|
392
|
+
.then(orders => ({ user, orders })))
|
|
393
|
+
}
|
|
394
|
+
\`\`\`
|
|
395
|
+
|
|
396
|
+
## Python
|
|
397
|
+
|
|
398
|
+
### Import Organization
|
|
399
|
+
|
|
400
|
+
Order imports: standard library, third-party, local:
|
|
401
|
+
|
|
402
|
+
\`\`\`python
|
|
403
|
+
|
|
404
|
+
# Good
|
|
405
|
+
|
|
406
|
+
import os
|
|
407
|
+
import sys
|
|
408
|
+
|
|
409
|
+
import numpy as np
|
|
410
|
+
import pandas as pd
|
|
411
|
+
|
|
412
|
+
from app.models import User
|
|
413
|
+
from app.utils import helper
|
|
414
|
+
|
|
415
|
+
# Bad - mixed order
|
|
416
|
+
|
|
417
|
+
from app.models import User
|
|
418
|
+
import numpy as np
|
|
419
|
+
import os
|
|
420
|
+
\`\`\`
|
|
421
|
+
|
|
422
|
+
### Type Hints
|
|
423
|
+
|
|
424
|
+
Use type hints for all function signatures:
|
|
425
|
+
|
|
426
|
+
\`\`\`python
|
|
427
|
+
|
|
428
|
+
# Good
|
|
429
|
+
|
|
430
|
+
def calculate_average(numbers: list[float]) -> float:
|
|
431
|
+
return sum(numbers) / len(numbers)
|
|
432
|
+
|
|
433
|
+
# Bad
|
|
434
|
+
|
|
435
|
+
def calculate_average(numbers):
|
|
436
|
+
return sum(numbers) / len(numbers)
|
|
437
|
+
\`\`\`
|
|
438
|
+
|
|
439
|
+
## Additional Languages
|
|
440
|
+
|
|
441
|
+
See language-specific guides for:
|
|
442
|
+
|
|
443
|
+
- Go: `references/go-style.md`
|
|
444
|
+
- Rust: `references/rust-style.md`
|
|
445
|
+
- Ruby: `references/ruby-style.md`
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### hooks/hooks.json
|
|
449
|
+
|
|
450
|
+
```json
|
|
451
|
+
{
|
|
452
|
+
"hooks": {
|
|
453
|
+
"PreToolUse": [
|
|
454
|
+
{
|
|
455
|
+
"matcher": "Write|Edit",
|
|
456
|
+
"hooks": [
|
|
457
|
+
{
|
|
458
|
+
"type": "prompt",
|
|
459
|
+
"prompt": "Before modifying code, verify it meets our coding standards from the code-standards skill. Check formatting, naming conventions, and documentation. If standards aren't met, suggest improvements.",
|
|
460
|
+
"timeout": 30
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
}
|
|
464
|
+
],
|
|
465
|
+
"Stop": [
|
|
466
|
+
{
|
|
467
|
+
"matcher": ".*",
|
|
468
|
+
"hooks": [
|
|
469
|
+
{
|
|
470
|
+
"type": "command",
|
|
471
|
+
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-commit.sh",
|
|
472
|
+
"timeout": 45
|
|
473
|
+
}
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### hooks/scripts/validate-commit.sh
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
#!/bin/bash
|
|
485
|
+
# Validate code quality before task completion
|
|
486
|
+
|
|
487
|
+
set -e
|
|
488
|
+
|
|
489
|
+
# Check if there are any uncommitted changes
|
|
490
|
+
if [[ -z $(git status -s) ]]; then
|
|
491
|
+
echo '{"systemMessage": "No changes to validate. Task complete."}'
|
|
492
|
+
exit 0
|
|
493
|
+
fi
|
|
494
|
+
|
|
495
|
+
# Run linter on changed files
|
|
496
|
+
CHANGED_FILES=$(git diff --name-only --cached | grep -E '\.(js|ts|py)$' || true)
|
|
497
|
+
|
|
498
|
+
if [[ -z "$CHANGED_FILES" ]]; then
|
|
499
|
+
echo '{"systemMessage": "No code files changed. Validation passed."}'
|
|
500
|
+
exit 0
|
|
501
|
+
fi
|
|
502
|
+
|
|
503
|
+
# Run appropriate linters
|
|
504
|
+
ISSUES=0
|
|
505
|
+
|
|
506
|
+
for file in $CHANGED_FILES; do
|
|
507
|
+
case "$file" in
|
|
508
|
+
*.js|*.ts)
|
|
509
|
+
if ! npx eslint "$file" --quiet; then
|
|
510
|
+
ISSUES=$((ISSUES + 1))
|
|
511
|
+
fi
|
|
512
|
+
;;
|
|
513
|
+
*.py)
|
|
514
|
+
if ! python -m pylint "$file" --errors-only; then
|
|
515
|
+
ISSUES=$((ISSUES + 1))
|
|
516
|
+
fi
|
|
517
|
+
;;
|
|
518
|
+
esac
|
|
519
|
+
done
|
|
520
|
+
|
|
521
|
+
if [[ $ISSUES -gt 0 ]]; then
|
|
522
|
+
echo "{\"systemMessage\": \"Found $ISSUES code quality issues. Please fix before completing.\"}"
|
|
523
|
+
exit 1
|
|
524
|
+
fi
|
|
525
|
+
|
|
526
|
+
echo '{"systemMessage": "Code quality checks passed. Ready to commit."}'
|
|
527
|
+
exit 0
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
## Usage Examples
|
|
531
|
+
|
|
532
|
+
### Running Commands
|
|
533
|
+
|
|
534
|
+
```
|
|
535
|
+
$ claude
|
|
536
|
+
> /lint
|
|
537
|
+
Running linter checks...
|
|
538
|
+
|
|
539
|
+
Critical Issues (2):
|
|
540
|
+
src/api/users.js:45 - SQL injection vulnerability
|
|
541
|
+
src/utils/helpers.js:12 - Unhandled promise rejection
|
|
542
|
+
|
|
543
|
+
Warnings (5):
|
|
544
|
+
src/components/Button.tsx:23 - Missing PropTypes
|
|
545
|
+
...
|
|
546
|
+
|
|
547
|
+
Style Suggestions (8):
|
|
548
|
+
src/index.js:1 - Use const instead of let
|
|
549
|
+
...
|
|
550
|
+
|
|
551
|
+
> /test
|
|
552
|
+
Running test suite...
|
|
553
|
+
|
|
554
|
+
Test Results:
|
|
555
|
+
✓ 245 passed
|
|
556
|
+
✗ 3 failed
|
|
557
|
+
○ 2 skipped
|
|
558
|
+
|
|
559
|
+
Coverage: 87.3%
|
|
560
|
+
|
|
561
|
+
Untested Files:
|
|
562
|
+
src/utils/cache.js - 0% coverage
|
|
563
|
+
src/api/webhooks.js - 23% coverage
|
|
564
|
+
|
|
565
|
+
Failed Tests:
|
|
566
|
+
1. User API › GET /users › should handle pagination
|
|
567
|
+
Expected 200, received 500
|
|
568
|
+
...
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Using Agents
|
|
572
|
+
|
|
573
|
+
```
|
|
574
|
+
> Review the changes in src/api/users.js
|
|
575
|
+
|
|
576
|
+
[code-reviewer agent selected automatically]
|
|
577
|
+
|
|
578
|
+
Code Review: src/api/users.js
|
|
579
|
+
|
|
580
|
+
Critical Issues:
|
|
581
|
+
1. Line 45: SQL injection vulnerability
|
|
582
|
+
- Using string concatenation for SQL query
|
|
583
|
+
- Replace with parameterized query
|
|
584
|
+
- Priority: CRITICAL
|
|
585
|
+
|
|
586
|
+
2. Line 67: Missing error handling
|
|
587
|
+
- Database query without try/catch
|
|
588
|
+
- Could crash server on DB error
|
|
589
|
+
- Priority: HIGH
|
|
590
|
+
|
|
591
|
+
Suggestions:
|
|
592
|
+
1. Line 23: Consider caching user data
|
|
593
|
+
- Frequent DB queries for same users
|
|
594
|
+
- Add Redis caching layer
|
|
595
|
+
- Priority: MEDIUM
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
## Key Points
|
|
599
|
+
|
|
600
|
+
1. **Complete manifest**: All recommended metadata fields
|
|
601
|
+
2. **Multiple components**: Commands, agents, skills, hooks
|
|
602
|
+
3. **Rich skills**: References and examples for detailed information
|
|
603
|
+
4. **Automation**: Hooks enforce standards automatically
|
|
604
|
+
5. **Integration**: Components work together cohesively
|
|
605
|
+
|
|
606
|
+
## When to Use This Pattern
|
|
607
|
+
|
|
608
|
+
- Production plugins for distribution
|
|
609
|
+
- Team collaboration tools
|
|
610
|
+
- Plugins requiring consistency enforcement
|
|
611
|
+
- Complex workflows with multiple entry points
|