claude-powerpack
CLAUDE.md2 starsChanged 9 months agoMITView on GitHub
Claude Powerpack is a Claude Code plugin that provides productivity tools for developers. Skills (alphabetical): This is a plugin repository with no build process. Testing is done by installing the plugin in Claude Code. Test skill activation by typing these prompts in Claude Code chat: - Update the PR description → update-pr skill - Create an expert consultation document for... → ask-expert skill - Debrief this session → debrief skill The extraction script is Node.js (ESM) and can be tested…
- Commits and pushes
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 123
When modifying the ask-expert skill or creating new skills:
- Distinctive: line 142
description: must include activation trigger phrases in quotes for auto-discovery
- Very specific: line 149
Glob tool: does not support brace expansion {A,B}*.md — use separate Glob patterns instead
- Very specific: line 150
Keep SKILL.md under 500 lines (move detailed examples to EXAMPLES.md)
- Very specific: line 152
When bumping versions with replace_all, verify per-skill version tags in README (e.g., ### analyze-deps (v1.9.0)) weren't changed — they …
- Distinctive: line 175
Key principle: Use relative paths for all script and file references within skills, as documented in the official Anthropic skills …
- Distinctive: line 182
Use ESLint with project settings
- Distinctive: line 183
Run Prettier for formatting
- Distinctive: line 184
Add JSDoc comments for all functions
- Distinctive: line 185
Use clear, descriptive variable names
- Very specific: line 238
Run npm run check-versions (or node scripts/check-versions.js) to verify — CI enforces this on every PR.
- Distinctive: line 243
Create a new commit for fixes instead of amending
- Distinctive: line 258
After merging version bump to main:
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Claude Powerpack is a Claude Code plugin that provides productivity tools for developers.
Agents:
- code-researcher - Deep codebase analysis using ast-grep, ripgrep, git, and native tools
Skills (alphabetical):
- analyze-deps - Analyzes dependency updates with breaking changes, new features, and actionable recommendations
- ask-expert - Extracts code with size tracking for external expert consultation
- debrief - Captures session learnings and updates project docs with progressive disclosure
- deep-interview - Structured requirements gathering via AskUserQuestion
- mine-history - Extracts learnings from all past session transcripts via pattern-based correction detection
- trim-pr - Pre-merge PR cleanup: trims accumulated cruft and over-engineering
- update-pr - Creates comprehensive PR descriptions by systematically reviewing all changes
Repository Structure
.claude-plugin/plugin.json- Plugin metadata and configurationagents/code-researcher.md- Deep codebase analysis agent (ast-grep, ripgrep, git)skills/mine-history/- Session history mining skillSKILL.md- 5-phase workflow for extracting and synthesizing learningsscripts/extract-learnings.js- Node.js extraction script (zero deps, ESM)
skills/debrief/- The debrief skill (session learning capture)SKILL.md- 4-phase debrief workflow with CLAUDE.md token discipline rulesEXAMPLES.md- Good vs bad examples, routing decision guideREADME.md- User-facing documentation
skills/update-pr/- The update-pr skill implementationSKILL.md- Multi-phase workflow for comprehensive PR descriptionsEXAMPLES.md- Good vs bad PR description examplesREADME.md- User-facing documentation
skills/ask-expert/- The ask-expert skill implementationSKILL.md- Skill definition loaded by Claude Code (with YAML frontmatter)EXAMPLES.md- Detailed usage examples and patternsREADME.md- User-facing documentationscripts/extract-code.js- Node.js script for code extraction with size tracking
scripts/check-versions.js- Verifies all version strings are in sync (used by CI and releases)
Development Commands
This is a plugin repository with no build process. Testing is done by installing the plugin in Claude Code.
Testing the Plugin Locally
# Install from your fork/branch
/plugin install YOUR-USERNAME/claude-powerpack
# Verify installation
/plugin
# Uninstall and reinstall after changes
/plugin uninstall claude-powerpack
/plugin install YOUR-USERNAME/claude-powerpackTest skill activation by typing these prompts in Claude Code chat:
Update the PR description→ update-pr skillCreate an expert consultation document for...→ ask-expert skillDebrief this session→ debrief skill
Testing the Extraction Script
The extraction script is Node.js (ESM) and can be tested directly:
# Requires Node.js 18+
node --version
# Show help
node skills/ask-expert/scripts/extract-code.js --help
# Test basic extraction
node skills/ask-expert/scripts/extract-code.js \
--track-size --output=/tmp/test.md \
README.md
# Verify output
wc -c /tmp/test.mdArchitecture
Plugin System Integration
The plugin follows Claude Code's plugin specification:
plugin.jsondefines metadata (name, version, description, repository)- Skills are placed in
skills/{skill-name}/directories - Agents are placed in
agents/directory (referenced via"agents": "./agents/"in plugin.json) - Each skill has
SKILL.mdwith YAML frontmatter defining activation criteria - Each agent has a markdown file with YAML frontmatter defining name, description, model, color, and tools
Skill Activation
Skills activate based on their description field in SKILL.md frontmatter. Claude matches user requests against these descriptions to determine which skill to invoke.
See README.md - Agents & Skills Included for example prompts that trigger each skill/agent.
Code Extraction Script
skills/ask-expert/scripts/extract-code.js is a standalone Node.js script that:
- Extracts full files, line ranges, or git diffs
- Formats output as markdown code blocks
- Tracks cumulative size to stay within 125KB limit
- Supports batch processing multiple files
- Validates all files before writing output (atomic operations)
- Can be used via CLI or config file
Key design patterns:
- Validation happens before any file writes (prevents partial output on errors)
- Appends to existing files (allows incremental building)
- Size tracking with warnings at 100KB and 115KB thresholds
- Supports both
--outputflag and traditional shell redirection
Skill Development Guidelines
When modifying the ask-expert skill or creating new skills:
SKILL.md Requirements (Claude Code 2.1.x)
---
name: skill-name
description: Clear description with trigger phrases. Use when user asks to "do X", "perform Y", or needs Z.
allowed-tools:
- Read
- Write
- Edit
- Bash(git:*)
- Bash(node:*)
user-invocable: true
context: fork
---- description must include activation trigger phrases in quotes for auto-discovery
- allowed-tools use YAML array format with Bash wildcard patterns (e.g.,
Bash(git:*)). It is pre-approval (suppresses permission prompts), NOT enforcement — unlisted tools/commands are not blocked, they just prompt (#37683, verified Claude Code v2.1.185). So acontext: forkskill whose orchestrator runs repo build/test commands must list them to avoid prompts (seetrim-prandpr-fix-angles). For an actual restriction usedisallowed-tools(added v2.1.152). - Bash patterns:
Bash(npm run:*)does NOT match barenpm test/npm ci— useBash(npm:*). A space before*is a word boundary (Bash(ls *)≠lsof); wrappers (timeout,nice,nohup, …) are stripped before matching. - user-invocable is the correct spelling (
user-invocablewith c, NOTuser-invokablewith k — VS Code extension has a known bug #23723) - context: fork runs skill in isolated sub-agent — but forked skills have NO conversation history and CANNOT use AskUserQuestion. Skills needing either must omit
context: fork. - Additional frontmatter fields:
argument-hint(autocomplete hint),model(per-skill model override),hooks(scoped hooks),agent(subagent type for forked skills) - Agent tool replaced
Taskin Claude Code 2.1.63. UseAgentinallowed-toolsfor spawning sub-agents.Taskstill works as a backward-compatible alias but should not be used in new code. - Glob tool does not support brace expansion
{A,B}*.md— use separate Glob patterns instead - Keep SKILL.md under 500 lines (move detailed examples to EXAMPLES.md)
- Skills should describe intent, not prescribe exact commands — Claude already knows git, gh, linting, and project detection. Focus on what Claude doesn't know: domain patterns, gotchas, output templates, and non-obvious constraints.
- When bumping versions with
replace_all, verify per-skill version tags in README (e.g.,### analyze-deps (v1.9.0)) weren't changed — they track introduction date, not current version
Progressive Disclosure Pattern
The skill uses a three-tier documentation structure:
- SKILL.md - Loaded by Claude, contains workflow and critical rules
- EXAMPLES.md - Detailed usage patterns and complete workflows
- README.md - User-facing documentation (not loaded by Claude)
This keeps Claude's context focused while providing comprehensive documentation.
File Path Patterns
The extraction script is accessed via relative path following official Claude Code conventions:
# Correct (works regardless of installation method):
node scripts/extract-code.js
# Why: Skills execute with their directory as the working directory
# This works for personal skills, project skills, and plugin-installed skillsKey principle: Use relative paths for all script and file references within skills, as documented in the official Anthropic skills repository.
Code Quality Standards
From CONTRIBUTING.md:
JavaScript/Node.js
- Use ESLint with project settings
- Run Prettier for formatting
- Add JSDoc comments for all functions
- Use clear, descriptive variable names
Skills Checklist
- ✅ Clear activation criteria in SKILL.md description
- ✅ Proper YAML frontmatter with allowed-tools
- ✅ Progressive disclosure (keep SKILL.md concise)
- ✅ Version documented in plugin.json
Important Constraints
Size Limits
Expert consultation documents target 125KB maximum to stay within LLM context limits. The extraction script enforces this with:
MAX_SIZE_BYTES = 125 * 1024- Warning at 100KB
- Warning at 115KB
- Error and exit at 125KB
Git Integration
Diff functionality requires:
- Valid git repository
- Valid git references (branches, commits, ranges)
- File must exist in git history
The script validates git refs before attempting diffs (skills/ask-expert/scripts/extract-code.js:117-149).
Testing Checklist
Before submitting changes:
- ✅ Test locally using
/plugin install YOUR-USERNAME/claude-powerpack - ✅ Verify skill activation with trigger phrases (both skills)
- ✅ Test update-pr skill on a branch with multiple commits
- ✅ Test extraction script with various file patterns
- ✅ Verify git diff functionality (if changed)
- ✅ Check size tracking accuracy
- ✅ Test error handling (missing files, invalid ranges, no PR, etc.)
- ✅ Update version in
plugin.jsonif needed - ✅ Run
node scripts/check-versions.jsto verify version consistency
Version Management
The plugin uses semantic versioning. When bumping versions, update ALL of these files:
| File | Field/Location |
.claude-plugin/plugin.json | "version": "x.y.z" |
.claude-plugin/marketplace.json | "version" in both top-level and plugins[0] |
package.json | "version": "x.y.z" |
README.md | Version badge URL |
CHANGELOG.md | New ## [x.y.z] section + footer link |
marketplace.json is what Claude Code settings displays — forgetting it shows stale versions to users.
Run npm run check-versions (or node scripts/check-versions.js) to verify — CI enforces this on every PR.
Git Workflow
Never amend pushed commits. Once a commit is pushed to a remote branch:
- Create a new commit for fixes instead of amending
- Amending requires force push, which rewrites public history
- Force push can cause issues for collaborators and breaks PR review flow
When amend is acceptable:
- Local commits not yet pushed
- Explicitly requested by the user
Prefer separate commits for:
- Security fixes (creates audit trail)
- Review feedback (shows the review process)
- Distinct logical changes
Creating a Release
After merging version bump to main:
# Switch to main and pull
git checkout main && git pull
# Verify all version strings are in sync (exits 1 on mismatch)
npm run check-versions
# Create GitHub release (uses CHANGELOG content for notes)
gh release create v1.1.1 --title "v1.1.1" --notes "$(cat <<'EOF'
## Fixed
- Description of fixes...
See [CHANGELOG.md](https://github.com/propstreet/claude-powerpack/blob/main/CHANGELOG.md) for full details.
EOF
)"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

