mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-13 13:23:31 +08:00
Compare commits
10 Commits
86b5a53e5d
...
v1.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c2e0eace8 | ||
|
|
77bb669dc5 | ||
|
|
b9d09cbebf | ||
|
|
d2191d09a2 | ||
|
|
11ad2a875f | ||
|
|
33186f1a93 | ||
|
|
90ad2f3885 | ||
|
|
e4e94a7e70 | ||
|
|
c0fdd89c49 | ||
|
|
0f7b3081ee |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "everything-claude-code",
|
"name": "everything-claude-code",
|
||||||
"version": "1.2.0",
|
"version": "1.4.1",
|
||||||
"description": "Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use",
|
"description": "Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Affaan Mustafa",
|
"name": "Affaan Mustafa",
|
||||||
|
|||||||
15
.github/FUNDING.yml
vendored
Normal file
15
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: [affaan-m]
|
||||||
|
# patreon: # Replace with a single Patreon username
|
||||||
|
# open_collective: # Replace with a single Open Collective username
|
||||||
|
# ko_fi: # Replace with a single Ko-fi username
|
||||||
|
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-hierarchical-namespace-controller
|
||||||
|
# liberapay: # Replace with a single Liberapay username
|
||||||
|
# issuehunt: # Replace with a single IssueHunt username
|
||||||
|
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-hierarchical-namespace-controller
|
||||||
|
# polar: # Replace with a single Polar username
|
||||||
|
# buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||||
|
# thanks_dev: # Replace with a single thanks.dev username
|
||||||
|
custom: ['https://ecc.tools']
|
||||||
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -25,6 +25,18 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Verify plugin.json version matches tag
|
||||||
|
env:
|
||||||
|
TAG_NAME: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
TAG_VERSION="${TAG_NAME#v}"
|
||||||
|
PLUGIN_VERSION=$(grep -oE '"version": *"[^"]*"' .claude-plugin/plugin.json | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
|
if [ "$TAG_VERSION" != "$PLUGIN_VERSION" ]; then
|
||||||
|
echo "::error::Tag version ($TAG_VERSION) does not match plugin.json version ($PLUGIN_VERSION)"
|
||||||
|
echo "Run: ./scripts/release.sh $TAG_VERSION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Generate changelog
|
- name: Generate changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -13,18 +13,21 @@
|
|||||||
* - SessionEnd → session.deleted
|
* - SessionEnd → session.deleted
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { PluginContext } from "@opencode-ai/plugin"
|
import type { PluginInput } from "@opencode-ai/plugin"
|
||||||
|
|
||||||
export const ECCHooksPlugin = async ({
|
export const ECCHooksPlugin = async ({
|
||||||
project,
|
|
||||||
client,
|
client,
|
||||||
$,
|
$,
|
||||||
directory,
|
directory,
|
||||||
worktree,
|
worktree,
|
||||||
}: PluginContext) => {
|
}: PluginInput) => {
|
||||||
// Track files edited in current session for console.log audit
|
// Track files edited in current session for console.log audit
|
||||||
const editedFiles = new Set<string>()
|
const editedFiles = new Set<string>()
|
||||||
|
|
||||||
|
// Helper to call the SDK's log API with correct signature
|
||||||
|
const log = (level: "debug" | "info" | "warn" | "error", message: string) =>
|
||||||
|
client.app.log({ body: { service: "ecc", level, message } })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Prettier Auto-Format Hook
|
* Prettier Auto-Format Hook
|
||||||
@@ -41,7 +44,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
if (event.path.match(/\.(ts|tsx|js|jsx)$/)) {
|
if (event.path.match(/\.(ts|tsx|js|jsx)$/)) {
|
||||||
try {
|
try {
|
||||||
await $`prettier --write ${event.path} 2>/dev/null`
|
await $`prettier --write ${event.path} 2>/dev/null`
|
||||||
client.app.log("info", `[ECC] Formatted: ${event.path}`)
|
log("info", `[ECC] Formatted: ${event.path}`)
|
||||||
} catch {
|
} catch {
|
||||||
// Prettier not installed or failed - silently continue
|
// Prettier not installed or failed - silently continue
|
||||||
}
|
}
|
||||||
@@ -53,7 +56,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
const result = await $`grep -n "console\\.log" ${event.path} 2>/dev/null`.text()
|
const result = await $`grep -n "console\\.log" ${event.path} 2>/dev/null`.text()
|
||||||
if (result.trim()) {
|
if (result.trim()) {
|
||||||
const lines = result.trim().split("\n").length
|
const lines = result.trim().split("\n").length
|
||||||
client.app.log(
|
log(
|
||||||
"warn",
|
"warn",
|
||||||
`[ECC] console.log found in ${event.path} (${lines} occurrence${lines > 1 ? "s" : ""})`
|
`[ECC] console.log found in ${event.path} (${lines} occurrence${lines > 1 ? "s" : ""})`
|
||||||
)
|
)
|
||||||
@@ -82,21 +85,21 @@ export const ECCHooksPlugin = async ({
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
await $`npx tsc --noEmit 2>&1`
|
await $`npx tsc --noEmit 2>&1`
|
||||||
client.app.log("info", "[ECC] TypeScript check passed")
|
log("info", "[ECC] TypeScript check passed")
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
const err = error as { stdout?: string }
|
const err = error as { stdout?: string }
|
||||||
client.app.log("warn", "[ECC] TypeScript errors detected:")
|
log("warn", "[ECC] TypeScript errors detected:")
|
||||||
if (err.stdout) {
|
if (err.stdout) {
|
||||||
// Log first few errors
|
// Log first few errors
|
||||||
const errors = err.stdout.split("\n").slice(0, 5)
|
const errors = err.stdout.split("\n").slice(0, 5)
|
||||||
errors.forEach((line: string) => client.app.log("warn", ` ${line}`))
|
errors.forEach((line: string) => log("warn", ` ${line}`))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PR creation logging
|
// PR creation logging
|
||||||
if (input.tool === "bash" && input.args?.toString().includes("gh pr create")) {
|
if (input.tool === "bash" && input.args?.toString().includes("gh pr create")) {
|
||||||
client.app.log("info", "[ECC] PR created - check GitHub Actions status")
|
log("info", "[ECC] PR created - check GitHub Actions status")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -115,7 +118,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
input.tool === "bash" &&
|
input.tool === "bash" &&
|
||||||
input.args?.toString().includes("git push")
|
input.args?.toString().includes("git push")
|
||||||
) {
|
) {
|
||||||
client.app.log(
|
log(
|
||||||
"info",
|
"info",
|
||||||
"[ECC] Remember to review changes before pushing: git diff origin/main...HEAD"
|
"[ECC] Remember to review changes before pushing: git diff origin/main...HEAD"
|
||||||
)
|
)
|
||||||
@@ -135,7 +138,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
!filePath.includes("LICENSE") &&
|
!filePath.includes("LICENSE") &&
|
||||||
!filePath.includes("CONTRIBUTING")
|
!filePath.includes("CONTRIBUTING")
|
||||||
) {
|
) {
|
||||||
client.app.log(
|
log(
|
||||||
"warn",
|
"warn",
|
||||||
`[ECC] Creating ${filePath} - consider if this documentation is necessary`
|
`[ECC] Creating ${filePath} - consider if this documentation is necessary`
|
||||||
)
|
)
|
||||||
@@ -150,7 +153,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
cmd.match(/^cargo\s+(build|test|run)/) ||
|
cmd.match(/^cargo\s+(build|test|run)/) ||
|
||||||
cmd.match(/^go\s+(build|test|run)/)
|
cmd.match(/^go\s+(build|test|run)/)
|
||||||
) {
|
) {
|
||||||
client.app.log(
|
log(
|
||||||
"info",
|
"info",
|
||||||
"[ECC] Long-running command detected - consider using background execution"
|
"[ECC] Long-running command detected - consider using background execution"
|
||||||
)
|
)
|
||||||
@@ -166,13 +169,13 @@ export const ECCHooksPlugin = async ({
|
|||||||
* Action: Loads context and displays welcome message
|
* Action: Loads context and displays welcome message
|
||||||
*/
|
*/
|
||||||
"session.created": async () => {
|
"session.created": async () => {
|
||||||
client.app.log("info", "[ECC] Session started - Everything Claude Code hooks active")
|
log("info", "[ECC] Session started - Everything Claude Code hooks active")
|
||||||
|
|
||||||
// Check for project-specific context files
|
// Check for project-specific context files
|
||||||
try {
|
try {
|
||||||
const hasClaudeMd = await $`test -f ${worktree}/CLAUDE.md && echo "yes"`.text()
|
const hasClaudeMd = await $`test -f ${worktree}/CLAUDE.md && echo "yes"`.text()
|
||||||
if (hasClaudeMd.trim() === "yes") {
|
if (hasClaudeMd.trim() === "yes") {
|
||||||
client.app.log("info", "[ECC] Found CLAUDE.md - loading project context")
|
log("info", "[ECC] Found CLAUDE.md - loading project context")
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// No CLAUDE.md found
|
// No CLAUDE.md found
|
||||||
@@ -189,7 +192,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
"session.idle": async () => {
|
"session.idle": async () => {
|
||||||
if (editedFiles.size === 0) return
|
if (editedFiles.size === 0) return
|
||||||
|
|
||||||
client.app.log("info", "[ECC] Session idle - running console.log audit")
|
log("info", "[ECC] Session idle - running console.log audit")
|
||||||
|
|
||||||
let totalConsoleLogCount = 0
|
let totalConsoleLogCount = 0
|
||||||
const filesWithConsoleLogs: string[] = []
|
const filesWithConsoleLogs: string[] = []
|
||||||
@@ -210,16 +213,16 @@ export const ECCHooksPlugin = async ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (totalConsoleLogCount > 0) {
|
if (totalConsoleLogCount > 0) {
|
||||||
client.app.log(
|
log(
|
||||||
"warn",
|
"warn",
|
||||||
`[ECC] Audit: ${totalConsoleLogCount} console.log statement(s) in ${filesWithConsoleLogs.length} file(s)`
|
`[ECC] Audit: ${totalConsoleLogCount} console.log statement(s) in ${filesWithConsoleLogs.length} file(s)`
|
||||||
)
|
)
|
||||||
filesWithConsoleLogs.forEach((f) =>
|
filesWithConsoleLogs.forEach((f) =>
|
||||||
client.app.log("warn", ` - ${f}`)
|
log("warn", ` - ${f}`)
|
||||||
)
|
)
|
||||||
client.app.log("warn", "[ECC] Remove console.log statements before committing")
|
log("warn", "[ECC] Remove console.log statements before committing")
|
||||||
} else {
|
} else {
|
||||||
client.app.log("info", "[ECC] Audit passed: No console.log statements found")
|
log("info", "[ECC] Audit passed: No console.log statements found")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Desktop notification (macOS)
|
// Desktop notification (macOS)
|
||||||
@@ -241,7 +244,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
* Action: Final cleanup and state saving
|
* Action: Final cleanup and state saving
|
||||||
*/
|
*/
|
||||||
"session.deleted": async () => {
|
"session.deleted": async () => {
|
||||||
client.app.log("info", "[ECC] Session ended - cleaning up")
|
log("info", "[ECC] Session ended - cleaning up")
|
||||||
editedFiles.clear()
|
editedFiles.clear()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -266,7 +269,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
* Action: Logs for audit trail
|
* Action: Logs for audit trail
|
||||||
*/
|
*/
|
||||||
"permission.asked": async (event: { tool: string; args: unknown }) => {
|
"permission.asked": async (event: { tool: string; args: unknown }) => {
|
||||||
client.app.log("info", `[ECC] Permission requested for: ${event.tool}`)
|
log("info", `[ECC] Permission requested for: ${event.tool}`)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -280,7 +283,7 @@ export const ECCHooksPlugin = async ({
|
|||||||
const completed = event.todos.filter((t) => t.done).length
|
const completed = event.todos.filter((t) => t.done).length
|
||||||
const total = event.todos.length
|
const total = event.todos.length
|
||||||
if (total > 0) {
|
if (total > 0) {
|
||||||
client.app.log("info", `[ECC] Progress: ${completed}/${total} tasks completed`)
|
log("info", `[ECC] Progress: ${completed}/${total} tasks completed`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* while taking advantage of OpenCode's more sophisticated 20+ event types.
|
* while taking advantage of OpenCode's more sophisticated 20+ event types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { ECCHooksPlugin, default } from "./ecc-hooks"
|
export { ECCHooksPlugin, default } from "./ecc-hooks.js"
|
||||||
|
|
||||||
// Re-export for named imports
|
// Re-export for named imports
|
||||||
export * from "./ecc-hooks"
|
export * from "./ecc-hooks.js"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Supports common coverage report formats.
|
* Supports common coverage report formats.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tool } from "@opencode-ai/plugin"
|
import { tool } from "@opencode-ai/plugin/tool"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
|
|
||||||
@@ -58,13 +58,13 @@ export default tool({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!coverageData) {
|
if (!coverageData) {
|
||||||
return {
|
return JSON.stringify({
|
||||||
success: false,
|
success: false,
|
||||||
error: "No coverage report found",
|
error: "No coverage report found",
|
||||||
suggestion:
|
suggestion:
|
||||||
"Run tests with coverage first: npm test -- --coverage",
|
"Run tests with coverage first: npm test -- --coverage",
|
||||||
searchedPaths: coveragePaths,
|
searchedPaths: coveragePaths,
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const passed = coverageData.total.percentage >= threshold
|
const passed = coverageData.total.percentage >= threshold
|
||||||
@@ -96,7 +96,7 @@ export default tool({
|
|||||||
.join("\n")}`
|
.join("\n")}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return JSON.stringify(result)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Automatically detects the package manager and test framework.
|
* Automatically detects the package manager and test framework.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tool } from "@opencode-ai/plugin"
|
import { tool } from "@opencode-ai/plugin/tool"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ export default tool({
|
|||||||
|
|
||||||
const command = cmd.join(" ")
|
const command = cmd.join(" ")
|
||||||
|
|
||||||
return {
|
return JSON.stringify({
|
||||||
command,
|
command,
|
||||||
packageManager,
|
packageManager,
|
||||||
testFramework,
|
testFramework,
|
||||||
@@ -93,7 +93,7 @@ export default tool({
|
|||||||
updateSnapshots: updateSnapshots || false,
|
updateSnapshots: updateSnapshots || false,
|
||||||
},
|
},
|
||||||
instructions: `Run this command to execute tests:\n\n${command}`,
|
instructions: `Run this command to execute tests:\n\n${command}`,
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
* The regex patterns below are used to DETECT potential issues in user code.
|
* The regex patterns below are used to DETECT potential issues in user code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tool } from "@opencode-ai/plugin"
|
import { tool } from "@opencode-ai/plugin/tool"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ export default tool({
|
|||||||
// Generate recommendations
|
// Generate recommendations
|
||||||
results.recommendations = generateRecommendations(results)
|
results.recommendations = generateRecommendations(results)
|
||||||
|
|
||||||
return results
|
return JSON.stringify(results)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
427
CONTRIBUTING.md
427
CONTRIBUTING.md
@@ -1,11 +1,22 @@
|
|||||||
# Contributing to Everything Claude Code
|
# Contributing to Everything Claude Code
|
||||||
|
|
||||||
Thanks for wanting to contribute. This repo is meant to be a community resource for Claude Code users.
|
Thanks for wanting to contribute! This repo is a community resource for Claude Code users.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [What We're Looking For](#what-were-looking-for)
|
||||||
|
- [Quick Start](#quick-start)
|
||||||
|
- [Contributing Skills](#contributing-skills)
|
||||||
|
- [Contributing Agents](#contributing-agents)
|
||||||
|
- [Contributing Hooks](#contributing-hooks)
|
||||||
|
- [Contributing Commands](#contributing-commands)
|
||||||
|
- [Pull Request Process](#pull-request-process)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## What We're Looking For
|
## What We're Looking For
|
||||||
|
|
||||||
### Agents
|
### Agents
|
||||||
|
|
||||||
New agents that handle specific tasks well:
|
New agents that handle specific tasks well:
|
||||||
- Language-specific reviewers (Python, Go, Rust)
|
- Language-specific reviewers (Python, Go, Rust)
|
||||||
- Framework experts (Django, Rails, Laravel, Spring)
|
- Framework experts (Django, Rails, Laravel, Spring)
|
||||||
@@ -13,164 +24,385 @@ New agents that handle specific tasks well:
|
|||||||
- Domain experts (ML pipelines, data engineering, mobile)
|
- Domain experts (ML pipelines, data engineering, mobile)
|
||||||
|
|
||||||
### Skills
|
### Skills
|
||||||
|
|
||||||
Workflow definitions and domain knowledge:
|
Workflow definitions and domain knowledge:
|
||||||
- Language best practices
|
- Language best practices
|
||||||
- Framework patterns
|
- Framework patterns
|
||||||
- Testing strategies
|
- Testing strategies
|
||||||
- Architecture guides
|
- Architecture guides
|
||||||
- Domain-specific knowledge
|
|
||||||
|
|
||||||
### Commands
|
|
||||||
|
|
||||||
Slash commands that invoke useful workflows:
|
|
||||||
- Deployment commands
|
|
||||||
- Testing commands
|
|
||||||
- Documentation commands
|
|
||||||
- Code generation commands
|
|
||||||
|
|
||||||
### Hooks
|
### Hooks
|
||||||
|
|
||||||
Useful automations:
|
Useful automations:
|
||||||
- Linting/formatting hooks
|
- Linting/formatting hooks
|
||||||
- Security checks
|
- Security checks
|
||||||
- Validation hooks
|
- Validation hooks
|
||||||
- Notification hooks
|
- Notification hooks
|
||||||
|
|
||||||
### Rules
|
### Commands
|
||||||
|
Slash commands that invoke useful workflows:
|
||||||
Always-follow guidelines:
|
- Deployment commands
|
||||||
- Security rules
|
- Testing commands
|
||||||
- Code style rules
|
- Code generation commands
|
||||||
- Testing requirements
|
|
||||||
- Naming conventions
|
|
||||||
|
|
||||||
### MCP Configurations
|
|
||||||
|
|
||||||
New or improved MCP server configs:
|
|
||||||
- Database integrations
|
|
||||||
- Cloud provider MCPs
|
|
||||||
- Monitoring tools
|
|
||||||
- Communication tools
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## How to Contribute
|
## Quick Start
|
||||||
|
|
||||||
### 1. Fork the repo
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/YOUR_USERNAME/everything-claude-code.git
|
# 1. Fork and clone
|
||||||
|
gh repo fork affaan-m/everything-claude-code --clone
|
||||||
cd everything-claude-code
|
cd everything-claude-code
|
||||||
|
|
||||||
|
# 2. Create a branch
|
||||||
|
git checkout -b feat/my-contribution
|
||||||
|
|
||||||
|
# 3. Add your contribution (see sections below)
|
||||||
|
|
||||||
|
# 4. Test locally
|
||||||
|
cp -r skills/my-skill ~/.claude/skills/ # for skills
|
||||||
|
# Then test with Claude Code
|
||||||
|
|
||||||
|
# 5. Submit PR
|
||||||
|
git add . && git commit -m "feat: add my-skill" && git push
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Create a branch
|
---
|
||||||
|
|
||||||
```bash
|
## Contributing Skills
|
||||||
git checkout -b add-python-reviewer
|
|
||||||
|
Skills are knowledge modules that Claude Code loads based on context.
|
||||||
|
|
||||||
|
### Directory Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
skills/
|
||||||
|
└── your-skill-name/
|
||||||
|
└── SKILL.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Add your contribution
|
### SKILL.md Template
|
||||||
|
|
||||||
Place files in the appropriate directory:
|
|
||||||
- `agents/` for new agents
|
|
||||||
- `skills/` for skills (can be single .md or directory)
|
|
||||||
- `commands/` for slash commands
|
|
||||||
- `rules/` for rule files
|
|
||||||
- `hooks/` for hook configurations
|
|
||||||
- `mcp-configs/` for MCP server configs
|
|
||||||
|
|
||||||
### 4. Follow the format
|
|
||||||
|
|
||||||
**Agents** should have frontmatter:
|
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
name: agent-name
|
name: your-skill-name
|
||||||
description: What it does
|
description: Brief description shown in skill list
|
||||||
tools: Read, Grep, Glob, Bash
|
|
||||||
model: sonnet
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Instructions here...
|
# Your Skill Title
|
||||||
```
|
|
||||||
|
|
||||||
**Skills** should be clear and actionable:
|
Brief overview of what this skill covers.
|
||||||
|
|
||||||
```markdown
|
## Core Concepts
|
||||||
# Skill Name
|
|
||||||
|
Explain key patterns and guidelines.
|
||||||
|
|
||||||
|
## Code Examples
|
||||||
|
|
||||||
|
\`\`\`typescript
|
||||||
|
// Include practical, tested examples
|
||||||
|
function example() {
|
||||||
|
// Well-commented code
|
||||||
|
}
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
- Actionable guidelines
|
||||||
|
- Do's and don'ts
|
||||||
|
- Common pitfalls to avoid
|
||||||
|
|
||||||
## When to Use
|
## When to Use
|
||||||
|
|
||||||
...
|
Describe scenarios where this skill applies.
|
||||||
|
|
||||||
## How It Works
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
...
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Commands** should explain what they do:
|
### Skill Checklist
|
||||||
|
|
||||||
|
- [ ] Focused on one domain/technology
|
||||||
|
- [ ] Includes practical code examples
|
||||||
|
- [ ] Under 500 lines
|
||||||
|
- [ ] Uses clear section headers
|
||||||
|
- [ ] Tested with Claude Code
|
||||||
|
|
||||||
|
### Example Skills
|
||||||
|
|
||||||
|
| Skill | Purpose |
|
||||||
|
|-------|---------|
|
||||||
|
| `coding-standards/` | TypeScript/JavaScript patterns |
|
||||||
|
| `frontend-patterns/` | React and Next.js best practices |
|
||||||
|
| `backend-patterns/` | API and database patterns |
|
||||||
|
| `security-review/` | Security checklist |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contributing Agents
|
||||||
|
|
||||||
|
Agents are specialized assistants invoked via the Task tool.
|
||||||
|
|
||||||
|
### File Location
|
||||||
|
|
||||||
|
```
|
||||||
|
agents/your-agent-name.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Agent Template
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
description: Brief description of command
|
name: your-agent-name
|
||||||
|
description: What this agent does and when Claude should invoke it. Be specific!
|
||||||
|
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
|
||||||
|
model: sonnet
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a [role] specialist.
|
||||||
|
|
||||||
|
## Your Role
|
||||||
|
|
||||||
|
- Primary responsibility
|
||||||
|
- Secondary responsibility
|
||||||
|
- What you DO NOT do (boundaries)
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
### Step 1: Understand
|
||||||
|
How you approach the task.
|
||||||
|
|
||||||
|
### Step 2: Execute
|
||||||
|
How you perform the work.
|
||||||
|
|
||||||
|
### Step 3: Verify
|
||||||
|
How you validate results.
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
What you return to the user.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### Example: [Scenario]
|
||||||
|
Input: [what user provides]
|
||||||
|
Action: [what you do]
|
||||||
|
Output: [what you return]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Agent Fields
|
||||||
|
|
||||||
|
| Field | Description | Options |
|
||||||
|
|-------|-------------|---------|
|
||||||
|
| `name` | Lowercase, hyphenated | `code-reviewer` |
|
||||||
|
| `description` | Used to decide when to invoke | Be specific! |
|
||||||
|
| `tools` | Only what's needed | `Read, Write, Edit, Bash, Grep, Glob, WebFetch, Task` |
|
||||||
|
| `model` | Complexity level | `haiku` (simple), `sonnet` (coding), `opus` (complex) |
|
||||||
|
|
||||||
|
### Example Agents
|
||||||
|
|
||||||
|
| Agent | Purpose |
|
||||||
|
|-------|---------|
|
||||||
|
| `tdd-guide.md` | Test-driven development |
|
||||||
|
| `code-reviewer.md` | Code review |
|
||||||
|
| `security-reviewer.md` | Security scanning |
|
||||||
|
| `build-error-resolver.md` | Fix build errors |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contributing Hooks
|
||||||
|
|
||||||
|
Hooks are automatic behaviors triggered by Claude Code events.
|
||||||
|
|
||||||
|
### File Location
|
||||||
|
|
||||||
|
```
|
||||||
|
hooks/hooks.json
|
||||||
|
```
|
||||||
|
|
||||||
|
### Hook Types
|
||||||
|
|
||||||
|
| Type | Trigger | Use Case |
|
||||||
|
|------|---------|----------|
|
||||||
|
| `PreToolUse` | Before tool runs | Validate, warn, block |
|
||||||
|
| `PostToolUse` | After tool runs | Format, check, notify |
|
||||||
|
| `SessionStart` | Session begins | Load context |
|
||||||
|
| `Stop` | Session ends | Cleanup, audit |
|
||||||
|
|
||||||
|
### Hook Format
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"hooks": {
|
||||||
|
"PreToolUse": [
|
||||||
|
{
|
||||||
|
"matcher": "tool == \"Bash\" && tool_input.command matches \"rm -rf /\"",
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "echo '[Hook] BLOCKED: Dangerous command' && exit 1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Block dangerous rm commands"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Matcher Syntax
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// Match specific tools
|
||||||
|
tool == "Bash"
|
||||||
|
tool == "Edit"
|
||||||
|
tool == "Write"
|
||||||
|
|
||||||
|
// Match input patterns
|
||||||
|
tool_input.command matches "npm install"
|
||||||
|
tool_input.file_path matches "\\.tsx?$"
|
||||||
|
|
||||||
|
// Combine conditions
|
||||||
|
tool == "Bash" && tool_input.command matches "git push"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Hook Examples
|
||||||
|
|
||||||
|
```json
|
||||||
|
// Block dev servers outside tmux
|
||||||
|
{
|
||||||
|
"matcher": "tool == \"Bash\" && tool_input.command matches \"npm run dev\"",
|
||||||
|
"hooks": [{"type": "command", "command": "echo 'Use tmux for dev servers' && exit 1"}],
|
||||||
|
"description": "Ensure dev servers run in tmux"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auto-format after editing TypeScript
|
||||||
|
{
|
||||||
|
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\.tsx?$\"",
|
||||||
|
"hooks": [{"type": "command", "command": "npx prettier --write \"$file_path\""}],
|
||||||
|
"description": "Format TypeScript files after edit"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Warn before git push
|
||||||
|
{
|
||||||
|
"matcher": "tool == \"Bash\" && tool_input.command matches \"git push\"",
|
||||||
|
"hooks": [{"type": "command", "command": "echo '[Hook] Review changes before pushing'"}],
|
||||||
|
"description": "Reminder to review before push"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Hook Checklist
|
||||||
|
|
||||||
|
- [ ] Matcher is specific (not overly broad)
|
||||||
|
- [ ] Includes clear error/info messages
|
||||||
|
- [ ] Uses correct exit codes (`exit 1` blocks, `exit 0` allows)
|
||||||
|
- [ ] Tested thoroughly
|
||||||
|
- [ ] Has description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contributing Commands
|
||||||
|
|
||||||
|
Commands are user-invoked actions with `/command-name`.
|
||||||
|
|
||||||
|
### File Location
|
||||||
|
|
||||||
|
```
|
||||||
|
commands/your-command.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Command Template
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
description: Brief description shown in /help
|
||||||
---
|
---
|
||||||
|
|
||||||
# Command Name
|
# Command Name
|
||||||
|
|
||||||
Detailed instructions...
|
## Purpose
|
||||||
|
|
||||||
|
What this command does.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
\`\`\`
|
||||||
|
/your-command [args]
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
1. First step
|
||||||
|
2. Second step
|
||||||
|
3. Final step
|
||||||
|
|
||||||
|
## Output
|
||||||
|
|
||||||
|
What the user receives.
|
||||||
```
|
```
|
||||||
|
|
||||||
**Hooks** should include descriptions:
|
### Example Commands
|
||||||
|
|
||||||
```json
|
| Command | Purpose |
|
||||||
{
|
|---------|---------|
|
||||||
"matcher": "...",
|
| `commit.md` | Create git commits |
|
||||||
"hooks": [...],
|
| `code-review.md` | Review code changes |
|
||||||
"description": "What this hook does"
|
| `tdd.md` | TDD workflow |
|
||||||
}
|
| `e2e.md` | E2E testing |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Pull Request Process
|
||||||
|
|
||||||
|
### 1. PR Title Format
|
||||||
|
|
||||||
|
```
|
||||||
|
feat(skills): add rust-patterns skill
|
||||||
|
feat(agents): add api-designer agent
|
||||||
|
feat(hooks): add auto-format hook
|
||||||
|
fix(skills): update React patterns
|
||||||
|
docs: improve contributing guide
|
||||||
```
|
```
|
||||||
|
|
||||||
### 5. Test your contribution
|
### 2. PR Description
|
||||||
|
|
||||||
Make sure your config works with Claude Code before submitting.
|
```markdown
|
||||||
|
## Summary
|
||||||
|
What you're adding and why.
|
||||||
|
|
||||||
### 6. Submit a PR
|
## Type
|
||||||
|
- [ ] Skill
|
||||||
|
- [ ] Agent
|
||||||
|
- [ ] Hook
|
||||||
|
- [ ] Command
|
||||||
|
|
||||||
```bash
|
## Testing
|
||||||
git add .
|
How you tested this.
|
||||||
git commit -m "Add Python code reviewer agent"
|
|
||||||
git push origin add-python-reviewer
|
## Checklist
|
||||||
|
- [ ] Follows format guidelines
|
||||||
|
- [ ] Tested with Claude Code
|
||||||
|
- [ ] No sensitive info (API keys, paths)
|
||||||
|
- [ ] Clear descriptions
|
||||||
```
|
```
|
||||||
|
|
||||||
Then open a PR with:
|
### 3. Review Process
|
||||||
- What you added
|
|
||||||
- Why it's useful
|
1. Maintainers review within 48 hours
|
||||||
- How you tested it
|
2. Address feedback if requested
|
||||||
|
3. Once approved, merged to main
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Guidelines
|
## Guidelines
|
||||||
|
|
||||||
### Do
|
### Do
|
||||||
|
- Keep contributions focused and modular
|
||||||
- Keep configs focused and modular
|
|
||||||
- Include clear descriptions
|
- Include clear descriptions
|
||||||
- Test before submitting
|
- Test before submitting
|
||||||
- Follow existing patterns
|
- Follow existing patterns
|
||||||
- Document any dependencies
|
- Document dependencies
|
||||||
|
|
||||||
### Don't
|
### Don't
|
||||||
|
|
||||||
- Include sensitive data (API keys, tokens, paths)
|
- Include sensitive data (API keys, tokens, paths)
|
||||||
- Add overly complex or niche configs
|
- Add overly complex or niche configs
|
||||||
- Submit untested configs
|
- Submit untested contributions
|
||||||
- Create duplicate functionality
|
- Create duplicates of existing functionality
|
||||||
- Add configs that require specific paid services without alternatives
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -178,14 +410,15 @@ Then open a PR with:
|
|||||||
|
|
||||||
- Use lowercase with hyphens: `python-reviewer.md`
|
- Use lowercase with hyphens: `python-reviewer.md`
|
||||||
- Be descriptive: `tdd-workflow.md` not `workflow.md`
|
- Be descriptive: `tdd-workflow.md` not `workflow.md`
|
||||||
- Match the agent/skill name to the filename
|
- Match name to filename
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Questions?
|
## Questions?
|
||||||
|
|
||||||
Open an issue or reach out on X: [@affaanmustafa](https://x.com/affaanmustafa)
|
- **Issues:** [github.com/affaan-m/everything-claude-code/issues](https://github.com/affaan-m/everything-claude-code/issues)
|
||||||
|
- **X/Twitter:** [@affaanmustafa](https://x.com/affaanmustafa)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Thanks for contributing. Let's build a great resource together.
|
Thanks for contributing! Let's build a great resource together.
|
||||||
|
|||||||
83
README.md
83
README.md
@@ -3,12 +3,18 @@
|
|||||||
# Everything Claude Code
|
# Everything Claude Code
|
||||||
|
|
||||||
[](https://github.com/affaan-m/everything-claude-code/stargazers)
|
[](https://github.com/affaan-m/everything-claude-code/stargazers)
|
||||||
|
[](https://github.com/affaan-m/everything-claude-code/network/members)
|
||||||
|
[](https://github.com/affaan-m/everything-claude-code/graphs/contributors)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||

|

|
||||||

|

|
||||||
|

|
||||||

|

|
||||||
|

|
||||||

|

|
||||||
|
|
||||||
|
> **42K+ stars** | **5K+ forks** | **24 contributors** | **6 languages supported**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
@@ -61,6 +67,38 @@ This repo is the raw code only. The guides explain everything.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## What's New
|
||||||
|
|
||||||
|
### v1.4.1 — Bug Fix (Feb 2026)
|
||||||
|
|
||||||
|
- **Fixed instinct import content loss** — `parse_instinct_file()` was silently dropping all content after frontmatter (Action, Evidence, Examples sections) during `/instinct-import`. Fixed by community contributor @ericcai0814 ([#148](https://github.com/affaan-m/everything-claude-code/issues/148), [#161](https://github.com/affaan-m/everything-claude-code/pull/161))
|
||||||
|
|
||||||
|
### v1.4.0 — Multi-Language Rules, Installation Wizard & PM2 (Feb 2026)
|
||||||
|
|
||||||
|
- **Interactive installation wizard** — New `configure-ecc` skill provides guided setup with merge/overwrite detection
|
||||||
|
- **PM2 & multi-agent orchestration** — 6 new commands (`/pm2`, `/multi-plan`, `/multi-execute`, `/multi-backend`, `/multi-frontend`, `/multi-workflow`) for managing complex multi-service workflows
|
||||||
|
- **Multi-language rules architecture** — Rules restructured from flat files into `common/` + `typescript/` + `python/` + `golang/` directories. Install only the languages you need
|
||||||
|
- **Chinese (zh-CN) translations** — Complete translation of all agents, commands, skills, and rules (80+ files)
|
||||||
|
- **GitHub Sponsors support** — Sponsor the project via GitHub Sponsors
|
||||||
|
- **Enhanced CONTRIBUTING.md** — Detailed PR templates for each contribution type
|
||||||
|
|
||||||
|
### v1.3.0 — OpenCode Plugin Support (Feb 2026)
|
||||||
|
|
||||||
|
- **Full OpenCode integration** — 12 agents, 24 commands, 16 skills with hook support via OpenCode's plugin system (20+ event types)
|
||||||
|
- **3 native custom tools** — run-tests, check-coverage, security-audit
|
||||||
|
- **LLM documentation** — `llms.txt` for comprehensive OpenCode docs
|
||||||
|
|
||||||
|
### v1.2.0 — Unified Commands & Skills (Feb 2026)
|
||||||
|
|
||||||
|
- **Python/Django support** — Django patterns, security, TDD, and verification skills
|
||||||
|
- **Java Spring Boot skills** — Patterns, security, TDD, and verification for Spring Boot
|
||||||
|
- **Session management** — `/sessions` command for session history
|
||||||
|
- **Continuous learning v2** — Instinct-based learning with confidence scoring, import/export, evolution
|
||||||
|
|
||||||
|
See the full changelog in [Releases](https://github.com/affaan-m/everything-claude-code/releases).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🚀 Quick Start
|
## 🚀 Quick Start
|
||||||
|
|
||||||
Get up and running in under 2 minutes:
|
Get up and running in under 2 minutes:
|
||||||
@@ -102,7 +140,7 @@ cp -r everything-claude-code/rules/golang/* ~/.claude/rules/
|
|||||||
/plugin list everything-claude-code@everything-claude-code
|
/plugin list everything-claude-code@everything-claude-code
|
||||||
```
|
```
|
||||||
|
|
||||||
✨ **That's it!** You now have access to 15+ agents, 30+ skills, and 20+ commands.
|
✨ **That's it!** You now have access to 15+ agents, 30+ skills, and 30+ commands.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -161,8 +199,10 @@ everything-claude-code/
|
|||||||
| |-- e2e-runner.md # Playwright E2E testing
|
| |-- e2e-runner.md # Playwright E2E testing
|
||||||
| |-- refactor-cleaner.md # Dead code cleanup
|
| |-- refactor-cleaner.md # Dead code cleanup
|
||||||
| |-- doc-updater.md # Documentation sync
|
| |-- doc-updater.md # Documentation sync
|
||||||
| |-- go-reviewer.md # Go code review (NEW)
|
| |-- go-reviewer.md # Go code review
|
||||||
| |-- go-build-resolver.md # Go build error resolution (NEW)
|
| |-- go-build-resolver.md # Go build error resolution
|
||||||
|
| |-- python-reviewer.md # Python code review (NEW)
|
||||||
|
| |-- database-reviewer.md # Database/Supabase review (NEW)
|
||||||
|
|
|
|
||||||
|-- skills/ # Workflow definitions and domain knowledge
|
|-- skills/ # Workflow definitions and domain knowledge
|
||||||
| |-- coding-standards/ # Language best practices
|
| |-- coding-standards/ # Language best practices
|
||||||
@@ -176,8 +216,19 @@ everything-claude-code/
|
|||||||
| |-- security-review/ # Security checklist
|
| |-- security-review/ # Security checklist
|
||||||
| |-- eval-harness/ # Verification loop evaluation (Longform Guide)
|
| |-- eval-harness/ # Verification loop evaluation (Longform Guide)
|
||||||
| |-- verification-loop/ # Continuous verification (Longform Guide)
|
| |-- verification-loop/ # Continuous verification (Longform Guide)
|
||||||
| |-- golang-patterns/ # Go idioms and best practices (NEW)
|
| |-- golang-patterns/ # Go idioms and best practices
|
||||||
| |-- golang-testing/ # Go testing patterns, TDD, benchmarks (NEW)
|
| |-- golang-testing/ # Go testing patterns, TDD, benchmarks
|
||||||
|
| |-- django-patterns/ # Django patterns, models, views (NEW)
|
||||||
|
| |-- django-security/ # Django security best practices (NEW)
|
||||||
|
| |-- django-tdd/ # Django TDD workflow (NEW)
|
||||||
|
| |-- django-verification/ # Django verification loops (NEW)
|
||||||
|
| |-- python-patterns/ # Python idioms and best practices (NEW)
|
||||||
|
| |-- python-testing/ # Python testing with pytest (NEW)
|
||||||
|
| |-- springboot-patterns/ # Java Spring Boot patterns (NEW)
|
||||||
|
| |-- springboot-security/ # Spring Boot security (NEW)
|
||||||
|
| |-- springboot-tdd/ # Spring Boot TDD (NEW)
|
||||||
|
| |-- springboot-verification/ # Spring Boot verification (NEW)
|
||||||
|
| |-- configure-ecc/ # Interactive installation wizard (NEW)
|
||||||
|
|
|
|
||||||
|-- commands/ # Slash commands for quick execution
|
|-- commands/ # Slash commands for quick execution
|
||||||
| |-- tdd.md # /tdd - Test-driven development
|
| |-- tdd.md # /tdd - Test-driven development
|
||||||
@@ -197,7 +248,13 @@ everything-claude-code/
|
|||||||
| |-- instinct-status.md # /instinct-status - View learned instincts (NEW)
|
| |-- instinct-status.md # /instinct-status - View learned instincts (NEW)
|
||||||
| |-- instinct-import.md # /instinct-import - Import instincts (NEW)
|
| |-- instinct-import.md # /instinct-import - Import instincts (NEW)
|
||||||
| |-- instinct-export.md # /instinct-export - Export instincts (NEW)
|
| |-- instinct-export.md # /instinct-export - Export instincts (NEW)
|
||||||
| |-- evolve.md # /evolve - Cluster instincts into skills (NEW)
|
| |-- evolve.md # /evolve - Cluster instincts into skills
|
||||||
|
| |-- pm2.md # /pm2 - PM2 service lifecycle management (NEW)
|
||||||
|
| |-- multi-plan.md # /multi-plan - Multi-agent task decomposition (NEW)
|
||||||
|
| |-- multi-execute.md # /multi-execute - Orchestrated multi-agent workflows (NEW)
|
||||||
|
| |-- multi-backend.md # /multi-backend - Backend multi-service orchestration (NEW)
|
||||||
|
| |-- multi-frontend.md # /multi-frontend - Frontend multi-service orchestration (NEW)
|
||||||
|
| |-- multi-workflow.md # /multi-workflow - General multi-service workflows (NEW)
|
||||||
|
|
|
|
||||||
|-- rules/ # Always-follow guidelines (copy to ~/.claude/rules/)
|
|-- rules/ # Always-follow guidelines (copy to ~/.claude/rules/)
|
||||||
| |-- README.md # Structure overview and installation guide
|
| |-- README.md # Structure overview and installation guide
|
||||||
@@ -511,10 +568,10 @@ Please contribute! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|||||||
|
|
||||||
### Ideas for Contributions
|
### Ideas for Contributions
|
||||||
|
|
||||||
- Language-specific skills (Python, Rust patterns) - Go now included!
|
- Language-specific skills (Rust, C#, Swift, Kotlin) — Go, Python, Java already included
|
||||||
- Framework-specific configs (Django, Rails, Laravel)
|
- Framework-specific configs (Rails, Laravel, FastAPI, NestJS) — Django, Spring Boot already included
|
||||||
- DevOps agents (Kubernetes, Terraform, AWS)
|
- DevOps agents (Kubernetes, Terraform, AWS, Docker)
|
||||||
- Testing strategies (different frameworks)
|
- Testing strategies (different frameworks, visual regression)
|
||||||
- Domain-specific knowledge (ML, data engineering, mobile)
|
- Domain-specific knowledge (ML, data engineering, mobile)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -539,9 +596,9 @@ The configuration is automatically detected from `.opencode/opencode.json`.
|
|||||||
|
|
||||||
| Feature | Claude Code | OpenCode | Status |
|
| Feature | Claude Code | OpenCode | Status |
|
||||||
|---------|-------------|----------|--------|
|
|---------|-------------|----------|--------|
|
||||||
| Agents | ✅ 12 agents | ✅ 12 agents | **Full parity** |
|
| Agents | ✅ 14 agents | ✅ 12 agents | **Claude Code leads** |
|
||||||
| Commands | ✅ 23 commands | ✅ 24 commands | **Full parity** |
|
| Commands | ✅ 30 commands | ✅ 24 commands | **Claude Code leads** |
|
||||||
| Skills | ✅ 16 skills | ✅ 16 skills | **Full parity** |
|
| Skills | ✅ 28 skills | ✅ 16 skills | **Claude Code leads** |
|
||||||
| Hooks | ✅ 3 phases | ✅ 20+ events | **OpenCode has more!** |
|
| Hooks | ✅ 3 phases | ✅ 20+ events | **OpenCode has more!** |
|
||||||
| Rules | ✅ 8 rules | ✅ 8 rules | **Full parity** |
|
| Rules | ✅ 8 rules | ✅ 8 rules | **Full parity** |
|
||||||
| MCP Servers | ✅ Full | ✅ Full | **Full parity** |
|
| MCP Servers | ✅ Full | ✅ Full | **Full parity** |
|
||||||
|
|||||||
47
SPONSORS.md
Normal file
47
SPONSORS.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# Sponsors
|
||||||
|
|
||||||
|
Thank you to everyone who sponsors this project! Your support keeps the ECC ecosystem growing.
|
||||||
|
|
||||||
|
## Enterprise Sponsors
|
||||||
|
|
||||||
|
*Become an [Enterprise sponsor](https://github.com/sponsors/affaan-m) to be featured here*
|
||||||
|
|
||||||
|
## Business Sponsors
|
||||||
|
|
||||||
|
*Become a [Business sponsor](https://github.com/sponsors/affaan-m) to be featured here*
|
||||||
|
|
||||||
|
## Team Sponsors
|
||||||
|
|
||||||
|
*Become a [Team sponsor](https://github.com/sponsors/affaan-m) to be featured here*
|
||||||
|
|
||||||
|
## Individual Sponsors
|
||||||
|
|
||||||
|
*Become a [sponsor](https://github.com/sponsors/affaan-m) to be listed here*
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Why Sponsor?
|
||||||
|
|
||||||
|
Your sponsorship helps:
|
||||||
|
|
||||||
|
- **Ship faster** — More time dedicated to building tools and features
|
||||||
|
- **Keep it free** — Premium features fund the free tier for everyone
|
||||||
|
- **Better support** — Sponsors get priority responses
|
||||||
|
- **Shape the roadmap** — Pro+ sponsors vote on features
|
||||||
|
|
||||||
|
## Sponsor Tiers
|
||||||
|
|
||||||
|
| Tier | Price | Benefits |
|
||||||
|
|------|-------|----------|
|
||||||
|
| Supporter | $5/mo | Name in README, early access |
|
||||||
|
| Builder | $10/mo | Premium tools access |
|
||||||
|
| Pro | $25/mo | Priority support, office hours |
|
||||||
|
| Team | $100/mo | 5 seats, team configs |
|
||||||
|
| Business | $500/mo | 25 seats, consulting credit |
|
||||||
|
| Enterprise | $2K/mo | Unlimited seats, custom tools |
|
||||||
|
|
||||||
|
[**Become a Sponsor →**](https://github.com/sponsors/affaan-m)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Updated automatically. Last sync: February 2026*
|
||||||
@@ -35,7 +35,7 @@ REPEAT → Next test case
|
|||||||
|
|
||||||
## Example Session
|
## Example Session
|
||||||
|
|
||||||
````
|
```text
|
||||||
User: /go-test I need a function to validate email addresses
|
User: /go-test I need a function to validate email addresses
|
||||||
|
|
||||||
Agent:
|
Agent:
|
||||||
@@ -167,7 +167,7 @@ ok project/validator 0.003s
|
|||||||
✓ Coverage: 100%
|
✓ Coverage: 100%
|
||||||
|
|
||||||
## TDD Complete!
|
## TDD Complete!
|
||||||
````
|
```
|
||||||
|
|
||||||
## Test Patterns
|
## Test Patterns
|
||||||
|
|
||||||
|
|||||||
51
install.sh
Executable file
51
install.sh
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# install.sh — Install claude rules while preserving directory structure.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# ./install.sh <language> [<language> ...]
|
||||||
|
#
|
||||||
|
# Examples:
|
||||||
|
# ./install.sh typescript
|
||||||
|
# ./install.sh typescript python golang
|
||||||
|
#
|
||||||
|
# This script copies rules into ~/.claude/rules/ keeping the common/ and
|
||||||
|
# language-specific subdirectories intact so that:
|
||||||
|
# 1. Files with the same name in common/ and <language>/ don't overwrite
|
||||||
|
# each other.
|
||||||
|
# 2. Relative references (e.g. ../common/coding-style.md) remain valid.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
RULES_DIR="$(cd "$(dirname "$0")/rules" && pwd)"
|
||||||
|
DEST_DIR="${CLAUDE_RULES_DIR:-$HOME/.claude/rules}"
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
echo "Usage: $0 <language> [<language> ...]"
|
||||||
|
echo ""
|
||||||
|
echo "Available languages:"
|
||||||
|
for dir in "$RULES_DIR"/*/; do
|
||||||
|
name="$(basename "$dir")"
|
||||||
|
[[ "$name" == "common" ]] && continue
|
||||||
|
echo " - $name"
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Always install common rules
|
||||||
|
echo "Installing common rules -> $DEST_DIR/common/"
|
||||||
|
mkdir -p "$DEST_DIR/common"
|
||||||
|
cp -r "$RULES_DIR/common/." "$DEST_DIR/common/"
|
||||||
|
|
||||||
|
# Install each requested language
|
||||||
|
for lang in "$@"; do
|
||||||
|
lang_dir="$RULES_DIR/$lang"
|
||||||
|
if [[ ! -d "$lang_dir" ]]; then
|
||||||
|
echo "Warning: rules/$lang/ does not exist, skipping." >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "Installing $lang rules -> $DEST_DIR/$lang/"
|
||||||
|
mkdir -p "$DEST_DIR/$lang"
|
||||||
|
cp -r "$lang_dir/." "$DEST_DIR/$lang/"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Done. Rules installed to $DEST_DIR/"
|
||||||
@@ -25,17 +25,36 @@ rules/
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
### Option 1: Install Script (Recommended)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install common + one or more language-specific rule sets
|
||||||
|
./install.sh typescript
|
||||||
|
./install.sh python
|
||||||
|
./install.sh golang
|
||||||
|
|
||||||
|
# Install multiple languages at once
|
||||||
|
./install.sh typescript python
|
||||||
|
```
|
||||||
|
|
||||||
|
### Option 2: Manual Installation
|
||||||
|
|
||||||
|
> **Important:** Copy entire directories — do NOT flatten with `/*`.
|
||||||
|
> Common and language-specific directories contain files with the same names.
|
||||||
|
> Flattening them into one directory causes language-specific files to overwrite
|
||||||
|
> common rules, and breaks the relative `../common/` references used by
|
||||||
|
> language-specific files.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install common rules (required for all projects)
|
# Install common rules (required for all projects)
|
||||||
cp -r rules/common/* ~/.claude/rules/
|
cp -r rules/common ~/.claude/rules/common
|
||||||
|
|
||||||
# Install language-specific rules based on your project's tech stack
|
# Install language-specific rules based on your project's tech stack
|
||||||
cp -r rules/typescript/* ~/.claude/rules/
|
cp -r rules/typescript ~/.claude/rules/typescript
|
||||||
cp -r rules/python/* ~/.claude/rules/
|
cp -r rules/python ~/.claude/rules/python
|
||||||
cp -r rules/golang/* ~/.claude/rules/
|
cp -r rules/golang ~/.claude/rules/golang
|
||||||
|
|
||||||
# Attention ! ! ! Configure according to your actual project requirements; the configuration here is for reference only.
|
# Attention ! ! ! Configure according to your actual project requirements; the configuration here is for reference only.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rules vs Skills
|
## Rules vs Skills
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ const {
|
|||||||
getClaudeDir,
|
getClaudeDir,
|
||||||
ensureDir,
|
ensureDir,
|
||||||
readFile,
|
readFile,
|
||||||
writeFile,
|
|
||||||
log
|
log
|
||||||
} = require('./utils');
|
} = require('./utils');
|
||||||
|
|
||||||
|
|||||||
67
scripts/release.sh
Executable file
67
scripts/release.sh
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Release script for bumping plugin version
|
||||||
|
# Usage: ./scripts/release.sh VERSION
|
||||||
|
|
||||||
|
VERSION="${1:-}"
|
||||||
|
PLUGIN_JSON=".claude-plugin/plugin.json"
|
||||||
|
|
||||||
|
# Function to show usage
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $0 VERSION"
|
||||||
|
echo "Example: $0 1.5.0"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Validate VERSION is provided
|
||||||
|
if [[ -z "$VERSION" ]]; then
|
||||||
|
echo "Error: VERSION argument is required"
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Validate VERSION is semver format (X.Y.Z)
|
||||||
|
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo "Error: VERSION must be in semver format (e.g., 1.5.0)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check current branch is main
|
||||||
|
CURRENT_BRANCH=$(git branch --show-current)
|
||||||
|
if [[ "$CURRENT_BRANCH" != "main" ]]; then
|
||||||
|
echo "Error: Must be on main branch (currently on $CURRENT_BRANCH)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check working tree is clean
|
||||||
|
if ! git diff --quiet || ! git diff --cached --quiet; then
|
||||||
|
echo "Error: Working tree is not clean. Commit or stash changes first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify plugin.json exists
|
||||||
|
if [[ ! -f "$PLUGIN_JSON" ]]; then
|
||||||
|
echo "Error: $PLUGIN_JSON not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Read current version
|
||||||
|
OLD_VERSION=$(grep -oE '"version": *"[^"]*"' "$PLUGIN_JSON" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
|
echo "Bumping version: $OLD_VERSION -> $VERSION"
|
||||||
|
|
||||||
|
# Update version in plugin.json (cross-platform sed)
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
# macOS
|
||||||
|
sed -i '' "s/\"version\": *\"[^\"]*\"/\"version\": \"$VERSION\"/" "$PLUGIN_JSON"
|
||||||
|
else
|
||||||
|
# Linux
|
||||||
|
sed -i "s/\"version\": *\"[^\"]*\"/\"version\": \"$VERSION\"/" "$PLUGIN_JSON"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Stage, commit, tag, and push
|
||||||
|
git add "$PLUGIN_JSON"
|
||||||
|
git commit -m "chore: bump plugin version to $VERSION"
|
||||||
|
git tag "v$VERSION"
|
||||||
|
git push origin main "v$VERSION"
|
||||||
|
|
||||||
|
echo "Released v$VERSION"
|
||||||
@@ -50,13 +50,8 @@ def parse_instinct_file(content: str) -> list[dict]:
|
|||||||
for line in content.split('\n'):
|
for line in content.split('\n'):
|
||||||
if line.strip() == '---':
|
if line.strip() == '---':
|
||||||
if in_frontmatter:
|
if in_frontmatter:
|
||||||
# End of frontmatter
|
# End of frontmatter - content comes next, don't append yet
|
||||||
in_frontmatter = False
|
in_frontmatter = False
|
||||||
if current:
|
|
||||||
current['content'] = '\n'.join(content_lines).strip()
|
|
||||||
instincts.append(current)
|
|
||||||
current = {}
|
|
||||||
content_lines = []
|
|
||||||
else:
|
else:
|
||||||
# Start of frontmatter
|
# Start of frontmatter
|
||||||
in_frontmatter = True
|
in_frontmatter = True
|
||||||
|
|||||||
82
skills/continuous-learning-v2/scripts/test_parse_instinct.py
Normal file
82
skills/continuous-learning-v2/scripts/test_parse_instinct.py
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
"""Tests for parse_instinct_file() — verifies content after frontmatter is preserved."""
|
||||||
|
|
||||||
|
import importlib.util
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Load instinct-cli.py (hyphenated filename requires importlib)
|
||||||
|
_spec = importlib.util.spec_from_file_location(
|
||||||
|
"instinct_cli",
|
||||||
|
os.path.join(os.path.dirname(__file__), "instinct-cli.py"),
|
||||||
|
)
|
||||||
|
_mod = importlib.util.module_from_spec(_spec)
|
||||||
|
_spec.loader.exec_module(_mod)
|
||||||
|
parse_instinct_file = _mod.parse_instinct_file
|
||||||
|
|
||||||
|
|
||||||
|
MULTI_SECTION = """\
|
||||||
|
---
|
||||||
|
id: instinct-a
|
||||||
|
trigger: "when coding"
|
||||||
|
confidence: 0.9
|
||||||
|
domain: general
|
||||||
|
---
|
||||||
|
|
||||||
|
## Action
|
||||||
|
Do thing A.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
- Example A1
|
||||||
|
|
||||||
|
---
|
||||||
|
id: instinct-b
|
||||||
|
trigger: "when testing"
|
||||||
|
confidence: 0.7
|
||||||
|
domain: testing
|
||||||
|
---
|
||||||
|
|
||||||
|
## Action
|
||||||
|
Do thing B.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def test_multiple_instincts_preserve_content():
|
||||||
|
result = parse_instinct_file(MULTI_SECTION)
|
||||||
|
assert len(result) == 2
|
||||||
|
assert "Do thing A." in result[0]["content"]
|
||||||
|
assert "Example A1" in result[0]["content"]
|
||||||
|
assert "Do thing B." in result[1]["content"]
|
||||||
|
|
||||||
|
|
||||||
|
def test_single_instinct_preserves_content():
|
||||||
|
content = """\
|
||||||
|
---
|
||||||
|
id: solo
|
||||||
|
trigger: "when reviewing"
|
||||||
|
confidence: 0.8
|
||||||
|
domain: review
|
||||||
|
---
|
||||||
|
|
||||||
|
## Action
|
||||||
|
Check for security issues.
|
||||||
|
|
||||||
|
## Evidence
|
||||||
|
Prevents vulnerabilities.
|
||||||
|
"""
|
||||||
|
result = parse_instinct_file(content)
|
||||||
|
assert len(result) == 1
|
||||||
|
assert "Check for security issues." in result[0]["content"]
|
||||||
|
assert "Prevents vulnerabilities." in result[0]["content"]
|
||||||
|
|
||||||
|
|
||||||
|
def test_empty_content_no_error():
|
||||||
|
content = """\
|
||||||
|
---
|
||||||
|
id: empty
|
||||||
|
trigger: "placeholder"
|
||||||
|
confidence: 0.5
|
||||||
|
domain: general
|
||||||
|
---
|
||||||
|
"""
|
||||||
|
result = parse_instinct_file(content)
|
||||||
|
assert len(result) == 1
|
||||||
|
assert result[0]["content"] == ""
|
||||||
165
skills/nutrient-document-processing/SKILL.md
Normal file
165
skills/nutrient-document-processing/SKILL.md
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
---
|
||||||
|
name: nutrient-document-processing
|
||||||
|
description: Process, convert, OCR, extract, redact, sign, and fill documents using the Nutrient DWS API. Works with PDFs, DOCX, XLSX, PPTX, HTML, and images.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Nutrient Document Processing
|
||||||
|
|
||||||
|
Process documents with the [Nutrient DWS Processor API](https://www.nutrient.io/api/). Convert formats, extract text and tables, OCR scanned documents, redact PII, add watermarks, digitally sign, and fill PDF forms.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Get a free API key at **https://dashboard.nutrient.io/sign_up/?product=processor**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export NUTRIENT_API_KEY="pdf_live_..."
|
||||||
|
```
|
||||||
|
|
||||||
|
All requests go to `https://api.nutrient.io/build` as multipart POST with an `instructions` JSON field.
|
||||||
|
|
||||||
|
## Operations
|
||||||
|
|
||||||
|
### Convert Documents
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# DOCX to PDF
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.docx=@document.docx" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.docx"}]}' \
|
||||||
|
-o output.pdf
|
||||||
|
|
||||||
|
# PDF to DOCX
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.pdf=@document.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"docx"}}' \
|
||||||
|
-o output.docx
|
||||||
|
|
||||||
|
# HTML to PDF
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "index.html=@index.html" \
|
||||||
|
-F 'instructions={"parts":[{"html":"index.html"}]}' \
|
||||||
|
-o output.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
Supported inputs: PDF, DOCX, XLSX, PPTX, DOC, XLS, PPT, PPS, PPSX, ODT, RTF, HTML, JPG, PNG, TIFF, HEIC, GIF, WebP, SVG, TGA, EPS.
|
||||||
|
|
||||||
|
### Extract Text and Data
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Extract plain text
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.pdf=@document.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"text"}}' \
|
||||||
|
-o output.txt
|
||||||
|
|
||||||
|
# Extract tables as Excel
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.pdf=@document.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"xlsx"}}' \
|
||||||
|
-o tables.xlsx
|
||||||
|
```
|
||||||
|
|
||||||
|
### OCR Scanned Documents
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# OCR to searchable PDF (supports 100+ languages)
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "scanned.pdf=@scanned.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"scanned.pdf"}],"actions":[{"type":"ocr","language":"english"}]}' \
|
||||||
|
-o searchable.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
Languages: Supports 100+ languages via ISO 639-2 codes (e.g., `eng`, `deu`, `fra`, `spa`, `jpn`, `kor`, `chi_sim`, `chi_tra`, `ara`, `hin`, `rus`). Full language names like `english` or `german` also work. See the [complete OCR language table](https://www.nutrient.io/guides/document-engine/ocr/language-support/) for all supported codes.
|
||||||
|
|
||||||
|
### Redact Sensitive Information
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Pattern-based (SSN, email)
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.pdf=@document.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"social-security-number"}},{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"email-address"}}]}' \
|
||||||
|
-o redacted.pdf
|
||||||
|
|
||||||
|
# Regex-based
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.pdf=@document.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"regex","strategyOptions":{"regex":"\\b[A-Z]{2}\\d{6}\\b"}}]}' \
|
||||||
|
-o redacted.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
Presets: `social-security-number`, `email-address`, `credit-card-number`, `international-phone-number`, `north-american-phone-number`, `date`, `time`, `url`, `ipv4`, `ipv6`, `mac-address`, `us-zip-code`, `vin`.
|
||||||
|
|
||||||
|
### Add Watermarks
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.pdf=@document.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"watermark","text":"CONFIDENTIAL","fontSize":72,"opacity":0.3,"rotation":-45}]}' \
|
||||||
|
-o watermarked.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
### Digital Signatures
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Self-signed CMS signature
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "document.pdf=@document.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"sign","signatureType":"cms"}]}' \
|
||||||
|
-o signed.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fill PDF Forms
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST https://api.nutrient.io/build \
|
||||||
|
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
|
||||||
|
-F "form.pdf=@form.pdf" \
|
||||||
|
-F 'instructions={"parts":[{"file":"form.pdf"}],"actions":[{"type":"fillForm","formFields":{"name":"Jane Smith","email":"jane@example.com","date":"2026-02-06"}}]}' \
|
||||||
|
-o filled.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
## MCP Server (Alternative)
|
||||||
|
|
||||||
|
For native tool integration, use the MCP server instead of curl:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"nutrient-dws": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": ["-y", "@nutrient-sdk/dws-mcp-server"],
|
||||||
|
"env": {
|
||||||
|
"NUTRIENT_DWS_API_KEY": "YOUR_API_KEY",
|
||||||
|
"SANDBOX_PATH": "/path/to/working/directory"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## When to Use
|
||||||
|
|
||||||
|
- Converting documents between formats (PDF, DOCX, XLSX, PPTX, HTML, images)
|
||||||
|
- Extracting text, tables, or key-value pairs from PDFs
|
||||||
|
- OCR on scanned documents or images
|
||||||
|
- Redacting PII before sharing documents
|
||||||
|
- Adding watermarks to drafts or confidential documents
|
||||||
|
- Digitally signing contracts or agreements
|
||||||
|
- Filling PDF forms programmatically
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- [API Playground](https://dashboard.nutrient.io/processor-api/playground/)
|
||||||
|
- [Full API Docs](https://www.nutrient.io/guides/dws-processor/)
|
||||||
|
- [Agent Skill Repo](https://github.com/PSPDFKit-labs/nutrient-agent-skill)
|
||||||
|
- [npm MCP Server](https://www.npmjs.com/package/@nutrient-sdk/dws-mcp-server)
|
||||||
Reference in New Issue
Block a user