toolhearth-skills 0.0.0-stage → 0.1.0
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 +29 -2
- package/bin/toolhearth-skills.js +72 -0
- package/package.json +28 -4
- package/skills/clean-ui-rules/SKILL.md +33 -0
- package/skills/disk-hygiene-ops/SKILL.md +33 -0
- package/skills/incident-triage-loop/SKILL.md +19 -0
- package/skills/nextjs-security-audit/SKILL.md +33 -0
- package/skills/safe-refactor-prune/SKILL.md +32 -0
package/README.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# toolhearth-skills
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Free, zero-dependency CLI to install all 5 Toolhearth coding-agent skills directly into Claude Code, Codex, Cursor, or Antigravity.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# List all available skills
|
|
9
|
+
npx toolhearth-skills list
|
|
10
|
+
|
|
11
|
+
# Install all skills (default: .agents/skills)
|
|
12
|
+
npx toolhearth-skills install all
|
|
13
|
+
|
|
14
|
+
# Install for Claude Code (.claude/skills)
|
|
15
|
+
npx toolhearth-skills install all --agent claude
|
|
16
|
+
|
|
17
|
+
# Install for Cursor (.cursor/rules) or Antigravity (~/.gemini/config/skills)
|
|
18
|
+
npx toolhearth-skills install clean-ui-rules --agent cursor
|
|
19
|
+
npx toolhearth-skills install all --agent antigravity
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Included Skills
|
|
23
|
+
- `clean-ui-rules` — Design & WCAG contrast ruleset
|
|
24
|
+
- `nextjs-security-audit` — Security review playbook for APIs, auth, and secrets
|
|
25
|
+
- `safe-refactor-prune` — 6-stage dead-code removal workflow
|
|
26
|
+
- `disk-hygiene-ops` — Safe local cache cleanup guardrails
|
|
27
|
+
- `incident-triage-loop` — Production deploy failure runbook
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
MIT · Free forever · Published by [alimahmoodrana28](https://www.npmjs.com/~alimahmoodrana28)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require("node:fs");
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const os = require("node:os");
|
|
5
|
+
|
|
6
|
+
const SKILLS = [
|
|
7
|
+
{
|
|
8
|
+
"slug": "clean-ui-rules",
|
|
9
|
+
"summary": "Eliminate generic AI UI clutter and enforce WCAG AA contrast."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"slug": "nextjs-security-audit",
|
|
13
|
+
"summary": "Audit Next.js APIs, auth cookies, webhooks, and secret leaks."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"slug": "safe-refactor-prune",
|
|
17
|
+
"summary": "6-stage safe removal of unused files, exports, and dependencies."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"slug": "disk-hygiene-ops",
|
|
21
|
+
"summary": "Safe local cache cleanup guardrails with 7-day undo quarantine."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"slug": "incident-triage-loop",
|
|
25
|
+
"summary": "Investigate deploy failures on Vercel/Render/Railway and verify fixes."
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
const args = process.argv.slice(2);
|
|
29
|
+
const cmd = args[0] || "help";
|
|
30
|
+
|
|
31
|
+
function resolveTargetRoot(agent) {
|
|
32
|
+
switch (agent) {
|
|
33
|
+
case "claude": return path.join(process.cwd(), ".claude", "skills");
|
|
34
|
+
case "cursor": return path.join(process.cwd(), ".cursor", "rules");
|
|
35
|
+
case "antigravity": return path.join(os.homedir(), ".gemini", "config", "skills");
|
|
36
|
+
case "codex":
|
|
37
|
+
default: return path.join(process.cwd(), ".agents", "skills");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (cmd === "list") {
|
|
42
|
+
console.log("Available Toolhearth coding-agent skills (100% free):\n");
|
|
43
|
+
for (const s of SKILLS) {
|
|
44
|
+
console.log(" " + s.slug.padEnd(24) + s.summary);
|
|
45
|
+
}
|
|
46
|
+
console.log("\nInstall one: npx toolhearth-skills install clean-ui-rules");
|
|
47
|
+
console.log("Install all: npx toolhearth-skills install all --agent claude");
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (cmd === "install") {
|
|
52
|
+
const target = args[1] || "all";
|
|
53
|
+
const agentIdx = args.indexOf("--agent");
|
|
54
|
+
const agent = agentIdx !== -1 && args[agentIdx + 1] ? args[agentIdx + 1] : "codex";
|
|
55
|
+
const toInstall = target === "all" ? SKILLS : SKILLS.filter((s) => s.slug === target);
|
|
56
|
+
if (toInstall.length === 0) {
|
|
57
|
+
console.error("Unknown skill: " + target + ". Run 'npx toolhearth-skills list'.");
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
const destRoot = resolveTargetRoot(agent);
|
|
61
|
+
fs.mkdirSync(destRoot, { recursive: true });
|
|
62
|
+
const srcRoot = path.join(__dirname, "..", "skills");
|
|
63
|
+
for (const s of toInstall) {
|
|
64
|
+
const destDir = path.join(destRoot, s.slug);
|
|
65
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
66
|
+
fs.copyFileSync(path.join(srcRoot, s.slug, "SKILL.md"), path.join(destDir, "SKILL.md"));
|
|
67
|
+
console.log("✓ Installed " + s.slug + " -> " + destDir);
|
|
68
|
+
}
|
|
69
|
+
process.exit(0);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log("Usage:\n npx toolhearth-skills list\n npx toolhearth-skills install <skill|all> [--agent claude|codex|cursor|antigravity]");
|
package/package.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolhearth-skills",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Free coding-agent skill pack for UI audits, Next.js security, safe refactoring, cache hygiene, and incident triage.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Ali Mahmood Rana <https://www.npmjs.com/~alimahmoodrana28>",
|
|
7
|
+
"homepage": "https://www.npmjs.com/~alimahmoodrana28",
|
|
8
|
+
"bin": {
|
|
9
|
+
"toolhearth-skills": "./bin/toolhearth-skills.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"bin",
|
|
13
|
+
"skills",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18.0.0"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"ai-agents",
|
|
21
|
+
"claude-code",
|
|
22
|
+
"codex",
|
|
23
|
+
"cursor",
|
|
24
|
+
"skills",
|
|
25
|
+
"toolhearth"
|
|
26
|
+
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plainwright
|
|
3
|
+
description: MUST USE when auditing, reviewing, or generating frontend UI to eliminate AI design slop (decorative gradients, drop shadows, badge pills, fake terminal chrome, off-grid spacing, and uppercase tracked labels). Use whenever user asks to "check slop", "audit design", "clean UI", "remove slop", "run plainwright", or enforce SlopScan rules S01-S10.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plainwright: AI Design Slop Remover
|
|
7
|
+
|
|
8
|
+
Plainwright enforces clean, quiet, matte front-end UI standards by identifying and removing decorative AI tropes.
|
|
9
|
+
|
|
10
|
+
## Rules Enforced
|
|
11
|
+
- **S01**: Remove tags, badges, count bubbles, eyebrow pills. Replace with plain sentence case muted text.
|
|
12
|
+
- **S02**: Remove italic text styling.
|
|
13
|
+
- **S03**: Remove Instrument Serif and negative letter spacing (`tracking-tight`).
|
|
14
|
+
- **S04**: Remove gradients, glows, blur, glass, and stacked box-shadows. Replace with flat surface background color.
|
|
15
|
+
- **S05**: Remove dividers (`<hr>`, `border-t`, `border-b`, `divide-x`). Replace with whitespace grouping (24px to 32px).
|
|
16
|
+
- **S06**: Remove opacity colors and uncontrolled color palettes. Limit to 1 background, 1 surface, 1 text, 1 muted, 1 accent.
|
|
17
|
+
- **S07**: Remove bordered containers (only text inputs may have a single 1px solid border).
|
|
18
|
+
- **S08**: Eliminate overly complex diagrams (>3 nodes).
|
|
19
|
+
- **S09**: Remove code breadcrumbs, fake file paths, and fake terminal chrome.
|
|
20
|
+
- **S10**: Remove artificial section numbering (e.g. "01.", "02.").
|
|
21
|
+
- **X01**: Remove emoji and sparkle decorations.
|
|
22
|
+
- **X02**: Remove marketing hype copy and exclamation marks.
|
|
23
|
+
- **X05**: Replace uppercase tracked labels with sentence case text.
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
Run the deterministic CLI scan:
|
|
27
|
+
```bash
|
|
28
|
+
node apps/cli/bin/plainwright.js ./src --fail-under 90
|
|
29
|
+
```
|
|
30
|
+
Or for JSON output in automated CI pipelines:
|
|
31
|
+
```bash
|
|
32
|
+
node apps/cli/bin/plainwright.js ./src --json
|
|
33
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: embersweep-guide
|
|
3
|
+
description: MUST USE when cleaning developer disk caches, reclaiming disk space, or pruning build artifacts (.next, dist, target, npm/pnpm/cargo/pip/go/docker caches) safely with 7-day reversible quarantine. Trigger when user asks to "clean caches", "free disk space", "run embersweep", or undo a cleanup. NOT for deleting source files or git history.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Embersweep Guide
|
|
7
|
+
|
|
8
|
+
Embersweep finds and removes regenerable caches and temporary developer data without ever risking user code or secrets.
|
|
9
|
+
|
|
10
|
+
## Safety Principles
|
|
11
|
+
1. **Never Touch**: `.env`, `.git`, `~/.ssh`, database directories, Docker named volumes, cloud sync folders, root drives.
|
|
12
|
+
2. **Safe Class**: Package manager caches (npm, pnpm, cargo, pip, go), Docker builder cache and dangling images, build outputs (`.next`, `dist`, `target`, `__pycache__`) in projects idle for 30+ days with clean git trees.
|
|
13
|
+
3. **Review Class**: `node_modules` or `.venv` in idle projects that have lockfiles. Requires explicit confirmation.
|
|
14
|
+
4. **Quarantine by Default**: Safe deletions move to `~/.embersweep/quarantine/<runId>` on the same volume with `manifest.json`. You have 7 days to undo with `embersweep undo`.
|
|
15
|
+
5. **No Network**: Operates purely on the local filesystem with zero outbound network traffic.
|
|
16
|
+
|
|
17
|
+
## CLI Commands
|
|
18
|
+
```bash
|
|
19
|
+
# Preview what can be cleaned (dry run by default)
|
|
20
|
+
embersweep scan
|
|
21
|
+
|
|
22
|
+
# Machine-readable output for scripts and agents
|
|
23
|
+
embersweep scan --json
|
|
24
|
+
|
|
25
|
+
# Apply only regenerable Safe caches to quarantine
|
|
26
|
+
embersweep apply --safe
|
|
27
|
+
|
|
28
|
+
# Undo the last quarantine run (restores byte-identical files)
|
|
29
|
+
embersweep undo
|
|
30
|
+
|
|
31
|
+
# Inspect a specific path against the safety guard
|
|
32
|
+
embersweep explain /path/to/suspect/dir
|
|
33
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wakemend-playbook
|
|
3
|
+
description: MUST USE when investigating production deploy failures, runtime error spikes on Vercel, Render, or Railway, running headless coding agents on a fix branch, verifying fixes independently, or triggering automatic rollback. Trigger when user asks to "fix production break", "investigate deploy failure", or "run wakemend". NOT for local dev lint errors.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Wakemend Playbook
|
|
7
|
+
|
|
8
|
+
1. **Provider MCP Endpoints (Read-Only)**:
|
|
9
|
+
- Vercel: `https://mcp.vercel.com`
|
|
10
|
+
- Render: `https://mcp.render.com/mcp` (Streamable HTTP, OAuth or Bearer API key)
|
|
11
|
+
- Railway: `https://mcp.railway.com` (Streamable HTTP OAuth 2.1 or `railway mcp` CLI v5.44.0+)
|
|
12
|
+
2. **Headless Agent Invocation**:
|
|
13
|
+
- Claude Code: `claude -p "<task>" --output-format json --allowedTools "Read,Grep,Edit" --max-turns 8`
|
|
14
|
+
- Codex CLI: `codex exec "<task>" --json --worktree`
|
|
15
|
+
- Cursor Agent: `cursor-agent -p --force --output-format json --worktree "<task>"`
|
|
16
|
+
3. **Hard Guardrails**:
|
|
17
|
+
- Never push to default branch; use `wakemend/incident-<id>`.
|
|
18
|
+
- Path guard rejects edits to `.github/`, lockfiles, `.env`, or infrastructure files.
|
|
19
|
+
- Independent verifier must confirm build, tests, and elimination of the original error signature before merge and again in production.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trusswell
|
|
3
|
+
description: MUST USE when auditing codebases for AI vibe-coding security vulnerabilities (exposed API keys in client code, unauthenticated webhooks, hallucinated packages, SQL/NoSQL injection sinks, open database rules, missing authorization, and insecure headers). Trigger whenever user asks to "check security", "audit vulnerabilities", "run trusswell", or review vibe-coded applications.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Trusswell: Security for Vibe-Coded Applications
|
|
7
|
+
|
|
8
|
+
Trusswell audits codebases for common AI code-generation security failures across 20 specialized rules.
|
|
9
|
+
|
|
10
|
+
## Priority Catalog Checks
|
|
11
|
+
- **SEC01**: Open Supabase/Firebase backend rules.
|
|
12
|
+
- **SEC02**: Hardcoded private secrets (Stripe, OpenAI, AWS, GitHub) in front-end bundles. Never store raw secrets; always compute SHA-256 fingerprints.
|
|
13
|
+
- **SEC03**: Hallucinated or typosquatted packages in `package.json`.
|
|
14
|
+
- **SEC04**: Webhook endpoints lacking cryptographic signature checks.
|
|
15
|
+
- **SEC05**: Missing security headers (CSP, HSTS, X-Frame-Options).
|
|
16
|
+
- **SEC08**: IDOR / Missing ownership verification in API routes.
|
|
17
|
+
- **SEC09**: Dangerous XSS sinks (`dangerouslySetInnerHTML`, `.innerHTML`).
|
|
18
|
+
- **SEC11**: Raw SQL and NoSQL query string interpolation.
|
|
19
|
+
- **SEC12**: Wildcard CORS with credentials enabled.
|
|
20
|
+
- **SEC13**: Authentication tokens stored in client `localStorage`.
|
|
21
|
+
- **SEC16**: GitHub Actions unpinned commits and `pull_request_target` abuse.
|
|
22
|
+
- **SEC17**: Dockerfile root user execution.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
Run the CLI audit:
|
|
26
|
+
```bash
|
|
27
|
+
node apps/trusswell-cli/bin/trusswell.js ./src --fail-on critical
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Generate standard SARIF for GitHub Code Scanning:
|
|
31
|
+
```bash
|
|
32
|
+
node apps/trusswell-cli/bin/trusswell.js ./src --sarif > results.sarif
|
|
33
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cullforge
|
|
3
|
+
description: MUST USE when cleaning up dead code, removing unused npm dependencies, excising hallucinated packages, pruning unused files/exports, or updating packages in safe stages. Trigger whenever user asks to "remove unused code", "clean dependencies", "run cullforge", or audit codebase hygiene.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cullforge: Codebase Hygiene & Dead Code Removal
|
|
7
|
+
|
|
8
|
+
Cullforge finds and safely removes unused files, exports, dependencies, and stale artifacts using a 6-step safe order of operations.
|
|
9
|
+
|
|
10
|
+
## Safe Order of Operations
|
|
11
|
+
1. Remove missing dependency errors.
|
|
12
|
+
2. Remove unused dependencies.
|
|
13
|
+
3. Remove unused files and exports.
|
|
14
|
+
4. Update patch versions.
|
|
15
|
+
5. Update minor versions.
|
|
16
|
+
6. Report majors only (never auto-apply majors).
|
|
17
|
+
|
|
18
|
+
## Risk Model Guarantee
|
|
19
|
+
- **Safe**: Files with zero inbound imports anywhere in the repository.
|
|
20
|
+
- **Review**: Files referenced only in configuration files or strings.
|
|
21
|
+
- **Risky**: Entry points, route files (`page.tsx`, `route.ts`), and dynamic import targets are NEVER marked Safe.
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
Run the scan:
|
|
25
|
+
```bash
|
|
26
|
+
node apps/cullforge-cli/bin/cullforge.js .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Apply safe removals on a clean git branch:
|
|
30
|
+
```bash
|
|
31
|
+
node apps/cullforge-cli/bin/cullforge.js apply --safe
|
|
32
|
+
```
|