Skip to content

Commit ea7a264

Browse files
PaulDuvallclaude
andcommitted
feat: add SSM token retrieval and published package documentation
- NPM token is now optional in workflow if stored in SSM - Workflow first checks SSM for existing token if none provided - Falls back to requiring token input if SSM is empty - Automatically stores provided tokens in SSM for future use - Added comprehensive PUBLISHED_PACKAGE_GUIDE.md with usage instructions The workflow now supports both modes: 1. Provide token on first run (stores in SSM) 2. Run without token on subsequent runs (uses SSM) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e34a3a8 commit ea7a264

File tree

2 files changed

+250
-16
lines changed

2 files changed

+250
-16
lines changed

.github/workflows/npm-publish-simple.yml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
workflow_dispatch:
55
inputs:
66
npm_token:
7-
description: 'NPM Token (get from https://www.npmjs.com/settings/tokens)'
8-
required: true
7+
description: 'NPM Token (optional if stored in SSM - get from https://www.npmjs.com/settings/tokens)'
8+
required: false
99
type: string
1010

1111
permissions:
@@ -30,25 +30,43 @@ jobs:
3030
role-to-assume: ${{ vars.AWS_DEPLOYMENT_ROLE }}
3131
aws-region: us-east-1
3232

33-
- name: Store NPM token in SSM (Optional)
34-
continue-on-error: true
33+
- name: Retrieve or Store NPM Token
34+
id: npm-token
3535
run: |
36-
if aws ssm put-parameter \
37-
--name "/npm/tokens/PaulDuvall-claude-code" \
38-
--value "${{ inputs.npm_token }}" \
39-
--type "SecureString" \
40-
--overwrite \
41-
--description "NPM token for publishing @paulduvall/claude-dev-toolkit" 2>/dev/null; then
42-
echo "✅ NPM token stored in SSM Parameter Store"
36+
# Try to get token from SSM first if no token provided
37+
if [ -z "${{ inputs.npm_token }}" ]; then
38+
echo "No token provided, checking SSM Parameter Store..."
39+
if NPM_TOKEN=$(aws ssm get-parameter --name "/npm/tokens/PaulDuvall-claude-code" --with-decryption --query 'Parameter.Value' --output text 2>/dev/null); then
40+
echo "✅ Retrieved NPM token from SSM Parameter Store"
41+
echo "token=$NPM_TOKEN" >> $GITHUB_OUTPUT
42+
echo "::add-mask::$NPM_TOKEN"
43+
else
44+
echo "❌ No token provided and no token found in SSM"
45+
echo "Please provide an NPM token or ensure one is stored in SSM"
46+
exit 1
47+
fi
4348
else
44-
echo "⚠️ Could not store token in SSM (insufficient permissions). Continuing with publish..."
45-
echo "To enable SSM storage, add ssm:PutParameter permission to your IAM role"
49+
echo "Using provided NPM token"
50+
echo "token=${{ inputs.npm_token }}" >> $GITHUB_OUTPUT
51+
echo "::add-mask::${{ inputs.npm_token }}"
52+
53+
# Store/update token in SSM for future use
54+
if aws ssm put-parameter \
55+
--name "/npm/tokens/PaulDuvall-claude-code" \
56+
--value "${{ inputs.npm_token }}" \
57+
--type "SecureString" \
58+
--overwrite \
59+
--description "NPM token for publishing @paulduvall/claude-dev-toolkit" 2>/dev/null; then
60+
echo "✅ NPM token stored/updated in SSM Parameter Store"
61+
else
62+
echo "⚠️ Could not store token in SSM (continuing anyway)"
63+
fi
4664
fi
4765
4866
- name: Configure NPM
4967
run: |
50-
npm config set //registry.npmjs.org/:_authToken=${{ inputs.npm_token }}
51-
echo "::add-mask::${{ inputs.npm_token }}"
68+
npm config set //registry.npmjs.org/:_authToken=${{ steps.npm-token.outputs.token }}
69+
echo "::add-mask::${{ steps.npm-token.outputs.token }}"
5270
5371
- name: Verify NPM Authentication
5472
run: |
@@ -59,7 +77,7 @@ jobs:
5977
6078
- name: Publish
6179
env:
62-
NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
80+
NODE_AUTH_TOKEN: ${{ steps.npm-token.outputs.token }}
6381
run: |
6482
cd claude-dev-toolkit
6583
echo "Publishing @paulduvall/claude-dev-toolkit..."

PUBLISHED_PACKAGE_GUIDE.md

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
# @paulduvall/claude-dev-toolkit - Published Package Guide
2+
3+
🎉 **Successfully Published to NPM!**
4+
5+
Your package is now available at: https://www.npmjs.com/package/@paulduvall/claude-dev-toolkit
6+
7+
## Installation
8+
9+
Users can now install your Claude Code toolkit using npm:
10+
11+
```bash
12+
# Global installation (recommended)
13+
npm install -g @paulduvall/claude-dev-toolkit
14+
15+
# Or using npx without installation
16+
npx @paulduvall/claude-dev-toolkit
17+
18+
# Local project installation
19+
npm install @paulduvall/claude-dev-toolkit
20+
```
21+
22+
## What Users Get
23+
24+
When users install `@paulduvall/claude-dev-toolkit`, they receive:
25+
26+
### 1. **Claude Commands CLI**
27+
A command-line tool that helps set up custom slash commands for Claude Code:
28+
29+
```bash
30+
# Run the setup wizard
31+
claude-commands
32+
33+
# Or use npx
34+
npx @paulduvall/claude-dev-toolkit
35+
```
36+
37+
### 2. **57 Custom Slash Commands**
38+
The toolkit includes production-ready and experimental commands:
39+
40+
#### Production Commands (13)
41+
- `/xarchitecture` - Architecture design and analysis
42+
- `/xconfig` - Configuration management
43+
- `/xdebug` - Advanced debugging
44+
- `/xdocs` - Documentation generation
45+
- `/xgit` - Automated Git workflow
46+
- `/xpipeline` - CI/CD pipeline management
47+
- `/xquality` - Code quality analysis
48+
- `/xrefactor` - Code refactoring automation
49+
- `/xrelease` - Release management
50+
- `/xsecurity` - Security scanning and analysis
51+
- `/xspec` - Specification generation
52+
- `/xtdd` - Test-driven development
53+
- `/xtest` - Testing automation
54+
55+
#### Experimental Commands (44)
56+
Including analytics, API tools, AWS integration, monitoring, performance optimization, and more.
57+
58+
### 3. **Configuration Templates**
59+
Pre-configured settings for different use cases:
60+
- Basic settings
61+
- Comprehensive settings
62+
- Security-focused settings
63+
64+
### 4. **Security Hooks**
65+
Built-in hooks for:
66+
- File operation logging
67+
- Credential exposure prevention
68+
69+
## Usage Instructions for End Users
70+
71+
### Quick Start
72+
73+
1. **Install the package globally:**
74+
```bash
75+
npm install -g @paulduvall/claude-dev-toolkit
76+
```
77+
78+
2. **Run the setup wizard:**
79+
```bash
80+
claude-commands
81+
```
82+
83+
3. **Follow the interactive prompts to:**
84+
- Configure Claude Code settings
85+
- Deploy custom commands
86+
- Set up security hooks
87+
- Apply configuration templates
88+
89+
### Manual Setup
90+
91+
Users can also manually set up specific components:
92+
93+
```bash
94+
# Deploy only active commands
95+
claude-commands deploy --active
96+
97+
# Deploy experimental commands
98+
claude-commands deploy --experimental
99+
100+
# Install security hooks
101+
claude-commands hooks --install
102+
103+
# Apply a specific configuration template
104+
claude-commands config --template security
105+
```
106+
107+
## Package Details
108+
109+
- **Package Name:** `@paulduvall/claude-dev-toolkit`
110+
- **Version:** 0.0.1-alpha.1
111+
- **Registry:** https://registry.npmjs.org
112+
- **License:** MIT
113+
- **Author:** Paul Duvall
114+
115+
## Features
116+
117+
### 🎯 Command Categories
118+
119+
- **Planning & Strategy:** Project planning, risk assessment
120+
- **Architecture & Design:** System design with proven patterns
121+
- **Development:** Refactoring, quality analysis, TDD
122+
- **Security & Compliance:** Vulnerability scanning, compliance checking
123+
- **CI/CD & Deployment:** Git workflows, pipeline management
124+
- **Infrastructure:** IaC management, monitoring setup
125+
126+
### 🔧 Installation Features
127+
128+
- **Interactive Setup Wizard:** Guided configuration process
129+
- **Error Recovery:** Automatic fallback mechanisms
130+
- **Cross-Platform:** Works on macOS, Linux, and Windows
131+
- **Claude Code Compatibility:** Checks for Claude Code installation
132+
- **Permission Handling:** Manages file permissions automatically
133+
134+
## Sharing and Promotion
135+
136+
### For GitHub README
137+
138+
Add this badge to your README:
139+
```markdown
140+
[![npm version](https://badge.fury.io/js/@paulduvall%2Fclaude-dev-toolkit.svg)](https://www.npmjs.com/package/@paulduvall/claude-dev-toolkit)
141+
```
142+
143+
### Installation Instructions for Users
144+
145+
Share this with users:
146+
147+
```markdown
148+
## Install Claude Dev Toolkit
149+
150+
Enhance your Claude Code experience with 57 custom commands:
151+
152+
\`\`\`bash
153+
npm install -g @paulduvall/claude-dev-toolkit
154+
claude-commands
155+
\`\`\`
156+
157+
Visit [npm](https://www.npmjs.com/package/@paulduvall/claude-dev-toolkit) for more details.
158+
```
159+
160+
## Updating the Package
161+
162+
When you need to publish updates:
163+
164+
1. **Update version in package.json:**
165+
```bash
166+
cd claude-dev-toolkit
167+
npm version patch # or minor/major
168+
```
169+
170+
2. **Run the GitHub Action:**
171+
- Go to Actions → NPM Publish
172+
- Run workflow with your NPM token
173+
174+
3. **Or publish locally:**
175+
```bash
176+
npm publish --access public
177+
```
178+
179+
## Support and Documentation
180+
181+
- **NPM Package Page:** https://www.npmjs.com/package/@paulduvall/claude-dev-toolkit
182+
- **GitHub Repository:** https://github.com/PaulDuvall/claude-code
183+
- **Issues:** https://github.com/PaulDuvall/claude-code/issues
184+
185+
## Next Steps
186+
187+
1. ✅ Package is live on NPM
188+
2. 📢 Share with the Claude Code community
189+
3. 📝 Add the NPM badge to your GitHub README
190+
4. 🔄 Set up automated releases with semantic versioning
191+
5. 📊 Monitor download statistics on NPM
192+
193+
## Troubleshooting for Users
194+
195+
If users encounter issues:
196+
197+
```bash
198+
# Clear npm cache
199+
npm cache clean --force
200+
201+
# Reinstall
202+
npm uninstall -g @paulduvall/claude-dev-toolkit
203+
npm install -g @paulduvall/claude-dev-toolkit
204+
205+
# Check installation
206+
which claude-commands
207+
208+
# Run with verbose output
209+
claude-commands --verbose
210+
```
211+
212+
---
213+
214+
🎊 **Congratulations on publishing your first NPM package!**
215+
216+
Your Claude Code toolkit is now available to developers worldwide. Users can enhance their Claude Code experience with your comprehensive collection of custom commands and automation tools.

0 commit comments

Comments
 (0)