ccstart 2.2.0 → 3.0.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 +50 -27
- package/bin/create-project.js +473 -102
- package/package.json +3 -12
- package/template/claude/CLAUDE.md +11 -92
- package/template/claude/agents/backend.md +1 -1
- package/template/claude/agents/frontend.md +1 -1
- package/template/claude/hooks/claude-md-reminder.sh +15 -0
- package/template/claude/hooks/ticket-reminder.sh +19 -0
- package/template/claude/skills/create-script/SKILL.md +362 -0
- package/template/claude/skills/design-feature/SKILL.md +3 -3
- package/template/claude/skills/skill-creator/SKILL.md +1 -1
- package/template/claude/docs/ROADMAP.md +0 -62
- package/template/claude/docs/agent-orchestration.md +0 -183
- package/template/claude/skills/design-principles/skill.md +0 -237
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccstart",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Start your Claude Code projects with a well-organized structure including agents, tickets,
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Start your Claude Code projects with a well-organized structure including agents, tickets, and skills",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ccstart": "bin/create-project.js"
|
|
7
7
|
},
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"author": "vichannnnn",
|
|
17
17
|
"contributors": [
|
|
18
18
|
"marcia_ong",
|
|
19
|
-
"hima7459"
|
|
20
|
-
"nasdin"
|
|
19
|
+
"hima7459"
|
|
21
20
|
],
|
|
22
21
|
"license": "MIT",
|
|
23
22
|
"repository": {
|
|
@@ -35,13 +34,5 @@
|
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
36
|
"@inquirer/checkbox": "^4.0.4"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"jest": "^30.0.5"
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"test": "jest",
|
|
44
|
-
"test:watch": "jest --watch",
|
|
45
|
-
"test:coverage": "jest --coverage"
|
|
46
37
|
}
|
|
47
38
|
}
|
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
```
|
|
18
18
|
.
|
|
19
19
|
├── CLAUDE.md # This file - project instructions for Claude
|
|
20
|
-
├── .
|
|
21
|
-
|
|
22
|
-
│
|
|
23
|
-
├──
|
|
24
|
-
│
|
|
25
|
-
|
|
26
|
-
│ ├── skills/ # Skill definitions (source of truth)
|
|
20
|
+
├── ROADMAP.md # Project roadmap and goals
|
|
21
|
+
├── .claude/ # Claude Code configuration
|
|
22
|
+
│ ├── agents/ # Specialized agents for Claude Code
|
|
23
|
+
│ ├── skills/ # Skills for workflow automation
|
|
24
|
+
│ └── hooks/ # Event hooks for Claude Code
|
|
25
|
+
├── claude/ # Project organization
|
|
27
26
|
│ └── tickets/ # Task tickets and issues
|
|
28
27
|
└── [your project files and directories]
|
|
29
28
|
```
|
|
@@ -42,79 +41,6 @@
|
|
|
42
41
|
- Add tests for new functionality
|
|
43
42
|
- Ensure all tests pass
|
|
44
43
|
|
|
45
|
-
### Git Workflow
|
|
46
|
-
|
|
47
|
-
- Create descriptive commit messages
|
|
48
|
-
- Keep commits focused and atomic
|
|
49
|
-
- Review changes before committing
|
|
50
|
-
|
|
51
|
-
## Commit Convention and Pull Request Guidelines
|
|
52
|
-
|
|
53
|
-
### Commit Message Format
|
|
54
|
-
Follow the conventional commits specification:
|
|
55
|
-
```
|
|
56
|
-
<type>(<scope>): <subject>
|
|
57
|
-
|
|
58
|
-
<body>
|
|
59
|
-
|
|
60
|
-
<footer>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**Types:**
|
|
64
|
-
- `feat`: New feature
|
|
65
|
-
- `fix`: Bug fix
|
|
66
|
-
- `docs`: Documentation changes
|
|
67
|
-
- `style`: Code style changes (formatting, missing semicolons, etc.)
|
|
68
|
-
- `refactor`: Code refactoring without changing functionality
|
|
69
|
-
- `test`: Adding or modifying tests
|
|
70
|
-
- `chore`: Maintenance tasks (updating dependencies, build process, etc.)
|
|
71
|
-
- `perf`: Performance improvements
|
|
72
|
-
|
|
73
|
-
**Examples:**
|
|
74
|
-
```
|
|
75
|
-
feat(auth): add password reset functionality
|
|
76
|
-
fix(api): handle null values in user response
|
|
77
|
-
docs: update API documentation for book endpoints
|
|
78
|
-
refactor(frontend): extract BookTable into separate components
|
|
79
|
-
chore(deps): update FastAPI to 0.104.1
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Pull Request Guidelines
|
|
83
|
-
|
|
84
|
-
**PR Title**: Use the same format as commit messages
|
|
85
|
-
|
|
86
|
-
**PR Description Template:**
|
|
87
|
-
```markdown
|
|
88
|
-
## Summary
|
|
89
|
-
Brief description of what this PR does and why it's needed.
|
|
90
|
-
|
|
91
|
-
## Changes
|
|
92
|
-
- List of specific changes made
|
|
93
|
-
- Technical implementation details if relevant
|
|
94
|
-
|
|
95
|
-
## Testing
|
|
96
|
-
- [ ] Tests pass (if applicable)
|
|
97
|
-
- [ ] Manual testing completed
|
|
98
|
-
- [ ] No console errors or warnings
|
|
99
|
-
|
|
100
|
-
## Manual Testing Steps
|
|
101
|
-
1. Describe steps to manually test the feature
|
|
102
|
-
2. Expected behavior and edge cases tested
|
|
103
|
-
|
|
104
|
-
## Screenshots (if UI changes)
|
|
105
|
-
Attach relevant screenshots here
|
|
106
|
-
|
|
107
|
-
## Related Issues
|
|
108
|
-
Closes #XXX (if applicable)
|
|
109
|
-
|
|
110
|
-
## Checklist
|
|
111
|
-
- [ ] Code follows project conventions
|
|
112
|
-
- [ ] Self-documented code without unnecessary comments
|
|
113
|
-
- [ ] All tests pass
|
|
114
|
-
- [ ] Documentation updated if needed
|
|
115
|
-
- [ ] No sensitive information exposed
|
|
116
|
-
```
|
|
117
|
-
|
|
118
44
|
## Common Commands
|
|
119
45
|
<!-- auto-generated-start:commands -->
|
|
120
46
|
```bash
|
|
@@ -129,14 +55,6 @@ Closes #XXX (if applicable)
|
|
|
129
55
|
|
|
130
56
|
[Add any project-specific context, dependencies, or requirements here]
|
|
131
57
|
|
|
132
|
-
## Agents
|
|
133
|
-
|
|
134
|
-
See @claude/agents/README.md for available agents and their purposes
|
|
135
|
-
|
|
136
|
-
## Agent Orchestration
|
|
137
|
-
|
|
138
|
-
After adding the agents you want to in `./claude/agents` folder, setup the workflow for Claude code to follow
|
|
139
|
-
|
|
140
58
|
## Skills
|
|
141
59
|
|
|
142
60
|
Skills extend Claude's capabilities with specialized workflows. Available skills:
|
|
@@ -150,10 +68,11 @@ Skills extend Claude's capabilities with specialized workflows. Available skills
|
|
|
150
68
|
- **/design-feature** - Guide feature development through requirements and design phases
|
|
151
69
|
|
|
152
70
|
**Utilities:**
|
|
153
|
-
- **/
|
|
71
|
+
- **/create-script** - Codify processes into standalone Python scripts with CLI interfaces
|
|
154
72
|
- **/skill-creator** - Guide for creating new skills
|
|
73
|
+
- **/update-claude-md** - Update CLAUDE.md sections through interactive Q&A
|
|
155
74
|
|
|
156
|
-
See
|
|
75
|
+
See `.claude/skills/` for skill definitions
|
|
157
76
|
|
|
158
77
|
## Tickets
|
|
159
78
|
|
|
@@ -169,7 +88,7 @@ See @claude/tickets/README.md for ticket format and management approach
|
|
|
169
88
|
|
|
170
89
|
## Development Context
|
|
171
90
|
|
|
172
|
-
- See @
|
|
91
|
+
- See @ROADMAP.md for current status and next steps
|
|
173
92
|
- Task-based development workflow with tickets in `claude/tickets` directory
|
|
174
93
|
|
|
175
94
|
## Important Instructions
|
|
@@ -177,7 +96,7 @@ See @claude/tickets/README.md for ticket format and management approach
|
|
|
177
96
|
Before starting any task:
|
|
178
97
|
|
|
179
98
|
1. **Confirm understanding**: Always confirm you understand the request and outline your plan before proceeding
|
|
180
|
-
2. **Ask clarifying questions**: Never make assumptions - ask questions when requirements are unclear
|
|
99
|
+
2. **Ask clarifying questions**: Never make assumptions - always ask questions when requirements are unclear
|
|
181
100
|
3. **No code comments**: Never add comments to any code you write - code should be self-documenting
|
|
182
101
|
4. **Maintain ticket list**: Always update @claude/tickets/ticket-list.md when creating, updating, or completing tickets to maintain a clear project overview
|
|
183
102
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: backend
|
|
3
|
-
description:
|
|
3
|
+
description: Backend architecture and API design specialist. Use for API endpoints, database models, authentication, and service logic. Invoke when building or modifying backend infrastructure.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Backend Agent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend
|
|
3
|
-
description:
|
|
3
|
+
description: Frontend architecture and UI design specialist. Use for UI components, state management, data fetching, and client-side logic. Invoke when building or modifying frontend features.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Frontend Agent
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
: <<'FRONTMATTER'
|
|
3
|
+
---
|
|
4
|
+
name: claude-md-reminder
|
|
5
|
+
description: Reminds Claude to respect CLAUDE.md and ask clarifying questions on every prompt
|
|
6
|
+
---
|
|
7
|
+
FRONTMATTER
|
|
8
|
+
|
|
9
|
+
cat << 'EOF'
|
|
10
|
+
<user-prompt-submit-hook>
|
|
11
|
+
REMINDER: Before responding to this prompt:
|
|
12
|
+
1. Review and respect all instructions in CLAUDE.md
|
|
13
|
+
2. Ask clarifying questions if any requirements are unclear - do not make assumptions
|
|
14
|
+
</user-prompt-submit-hook>
|
|
15
|
+
EOF
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
: <<'FRONTMATTER'
|
|
3
|
+
---
|
|
4
|
+
name: ticket-reminder
|
|
5
|
+
description: Reminds Claude to create a ticket for significant features or bug fixes after plan approval
|
|
6
|
+
hooks:
|
|
7
|
+
- event: PostToolUse
|
|
8
|
+
matcher: ExitPlanMode
|
|
9
|
+
---
|
|
10
|
+
FRONTMATTER
|
|
11
|
+
|
|
12
|
+
cat << 'EOF'
|
|
13
|
+
<post-tool-use-hook>
|
|
14
|
+
REMINDER: After the user approves this plan, consider whether this feature or bug fix justifies creating a ticket:
|
|
15
|
+
- If this is a significant feature, enhancement, or bug fix, use /create-ticket to create a ticket that captures the plan
|
|
16
|
+
- Include the implementation details from the plan in the ticket
|
|
17
|
+
- Skip ticket creation for trivial changes (typos, minor tweaks, quick fixes)
|
|
18
|
+
</post-tool-use-hook>
|
|
19
|
+
EOF
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-script
|
|
3
|
+
description: Codify discovered processes into standalone, reusable Python scripts. Use when the user has figured out a process (API integration, data pipeline, automation task) and wants to turn it into a reusable script, or when the user says "/create-script".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create Script Skill
|
|
7
|
+
|
|
8
|
+
Turn discovered processes into production-ready Python scripts with CLI interfaces.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- After exploring an API and figuring out the request flow
|
|
13
|
+
- After solving a data transformation problem
|
|
14
|
+
- When automating a manual process
|
|
15
|
+
- When the user wants to capture a working solution as a reusable tool
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
### Step 1: Gather Context
|
|
20
|
+
|
|
21
|
+
Review the conversation to identify:
|
|
22
|
+
- What process was discovered or solved
|
|
23
|
+
- What API endpoints, data sources, or operations are involved
|
|
24
|
+
- What worked and what didn't (avoid repeating mistakes)
|
|
25
|
+
|
|
26
|
+
### Step 2: Identify Requirements
|
|
27
|
+
|
|
28
|
+
Ask about or determine:
|
|
29
|
+
- **Inputs**: What data does the script need? (files, API keys, parameters)
|
|
30
|
+
- **Outputs**: What should the script produce? (files, stdout, API calls)
|
|
31
|
+
- **Configuration**: What might change between runs? (URLs, credentials, options)
|
|
32
|
+
- **Error cases**: What can go wrong and how should it be handled?
|
|
33
|
+
|
|
34
|
+
### Step 3: Design Script Structure
|
|
35
|
+
|
|
36
|
+
Plan the script organization:
|
|
37
|
+
- Break logic into focused functions
|
|
38
|
+
- Identify what should be configurable via CLI arguments
|
|
39
|
+
- Determine what should come from environment variables (secrets)
|
|
40
|
+
- Plan the main flow and error handling
|
|
41
|
+
|
|
42
|
+
### Step 4: Generate the Script
|
|
43
|
+
|
|
44
|
+
Create a Python script following the template structure below. Include:
|
|
45
|
+
- Clear CLI interface with help text
|
|
46
|
+
- Environment variable handling for secrets
|
|
47
|
+
- Proper error handling and exit codes
|
|
48
|
+
- Logging for visibility into what's happening
|
|
49
|
+
|
|
50
|
+
### Step 5: Provide Usage Examples
|
|
51
|
+
|
|
52
|
+
After generating the script:
|
|
53
|
+
- Show example invocations
|
|
54
|
+
- Document required environment variables
|
|
55
|
+
- Suggest next steps (testing, scheduling, extending)
|
|
56
|
+
|
|
57
|
+
## Script Template
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
#!/usr/bin/env python3
|
|
61
|
+
"""
|
|
62
|
+
[Script description - what it does and why]
|
|
63
|
+
|
|
64
|
+
Usage:
|
|
65
|
+
python script_name.py [options] <arguments>
|
|
66
|
+
|
|
67
|
+
Examples:
|
|
68
|
+
python script_name.py --input data.json
|
|
69
|
+
python script_name.py --verbose --output results.csv
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
import argparse
|
|
73
|
+
import logging
|
|
74
|
+
import os
|
|
75
|
+
import sys
|
|
76
|
+
|
|
77
|
+
logging.basicConfig(
|
|
78
|
+
level=logging.INFO,
|
|
79
|
+
format="%(asctime)s - %(levelname)s - %(message)s"
|
|
80
|
+
)
|
|
81
|
+
logger = logging.getLogger(__name__)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def get_config():
|
|
85
|
+
"""Load configuration from environment variables."""
|
|
86
|
+
return {
|
|
87
|
+
"api_key": os.environ.get("API_KEY"),
|
|
88
|
+
"base_url": os.environ.get("BASE_URL", "https://api.example.com"),
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def validate_config(config):
|
|
93
|
+
"""Validate required configuration is present."""
|
|
94
|
+
missing = [k for k, v in config.items() if v is None and k in ["api_key"]]
|
|
95
|
+
if missing:
|
|
96
|
+
logger.error(f"Missing required environment variables: {', '.join(missing)}")
|
|
97
|
+
sys.exit(1)
|
|
98
|
+
return config
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def main_logic(args, config):
|
|
102
|
+
"""Core script logic goes here."""
|
|
103
|
+
logger.info(f"Processing with input: {args.input}")
|
|
104
|
+
|
|
105
|
+
# Implementation here
|
|
106
|
+
|
|
107
|
+
return {"status": "success"}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def parse_args():
|
|
111
|
+
"""Parse command line arguments."""
|
|
112
|
+
parser = argparse.ArgumentParser(
|
|
113
|
+
description="[Script description]",
|
|
114
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
115
|
+
epilog="""
|
|
116
|
+
Examples:
|
|
117
|
+
%(prog)s --input data.json
|
|
118
|
+
%(prog)s --verbose --output results.csv
|
|
119
|
+
|
|
120
|
+
Environment Variables:
|
|
121
|
+
API_KEY Required. API authentication key.
|
|
122
|
+
BASE_URL Optional. API base URL (default: https://api.example.com)
|
|
123
|
+
"""
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
parser.add_argument(
|
|
127
|
+
"--input", "-i",
|
|
128
|
+
required=True,
|
|
129
|
+
help="Input file path"
|
|
130
|
+
)
|
|
131
|
+
parser.add_argument(
|
|
132
|
+
"--output", "-o",
|
|
133
|
+
default="-",
|
|
134
|
+
help="Output file path (default: stdout)"
|
|
135
|
+
)
|
|
136
|
+
parser.add_argument(
|
|
137
|
+
"--verbose", "-v",
|
|
138
|
+
action="store_true",
|
|
139
|
+
help="Enable verbose logging"
|
|
140
|
+
)
|
|
141
|
+
parser.add_argument(
|
|
142
|
+
"--dry-run",
|
|
143
|
+
action="store_true",
|
|
144
|
+
help="Show what would be done without making changes"
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
return parser.parse_args()
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def main():
|
|
151
|
+
"""Main entry point."""
|
|
152
|
+
args = parse_args()
|
|
153
|
+
|
|
154
|
+
if args.verbose:
|
|
155
|
+
logging.getLogger().setLevel(logging.DEBUG)
|
|
156
|
+
|
|
157
|
+
try:
|
|
158
|
+
config = validate_config(get_config())
|
|
159
|
+
result = main_logic(args, config)
|
|
160
|
+
|
|
161
|
+
if result.get("status") == "success":
|
|
162
|
+
logger.info("Completed successfully")
|
|
163
|
+
sys.exit(0)
|
|
164
|
+
else:
|
|
165
|
+
logger.error(f"Failed: {result.get('error', 'Unknown error')}")
|
|
166
|
+
sys.exit(1)
|
|
167
|
+
|
|
168
|
+
except KeyboardInterrupt:
|
|
169
|
+
logger.info("Interrupted by user")
|
|
170
|
+
sys.exit(130)
|
|
171
|
+
except Exception as e:
|
|
172
|
+
logger.error(f"Unexpected error: {e}")
|
|
173
|
+
sys.exit(1)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
if __name__ == "__main__":
|
|
177
|
+
main()
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## CLI Design Guidelines
|
|
181
|
+
|
|
182
|
+
### Use argparse (standard library)
|
|
183
|
+
|
|
184
|
+
Prefer argparse over external dependencies like click:
|
|
185
|
+
- Zero dependencies means easier distribution
|
|
186
|
+
- Familiar to most Python developers
|
|
187
|
+
- Sufficient for most CLI needs
|
|
188
|
+
|
|
189
|
+
### Argument Patterns
|
|
190
|
+
|
|
191
|
+
**Positional arguments** for required, obvious inputs:
|
|
192
|
+
```python
|
|
193
|
+
parser.add_argument("filename", help="File to process")
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Flags** for optional behavior:
|
|
197
|
+
```python
|
|
198
|
+
parser.add_argument("--verbose", "-v", action="store_true")
|
|
199
|
+
parser.add_argument("--format", choices=["json", "csv"], default="json")
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Environment variable fallbacks** for secrets:
|
|
203
|
+
```python
|
|
204
|
+
parser.add_argument(
|
|
205
|
+
"--api-key",
|
|
206
|
+
default=os.environ.get("API_KEY"),
|
|
207
|
+
help="API key (default: $API_KEY)"
|
|
208
|
+
)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Subcommands for Multi-Action Scripts
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
215
|
+
|
|
216
|
+
fetch_parser = subparsers.add_parser("fetch", help="Fetch data from API")
|
|
217
|
+
fetch_parser.add_argument("--since", help="Fetch records since date")
|
|
218
|
+
|
|
219
|
+
export_parser = subparsers.add_parser("export", help="Export data to file")
|
|
220
|
+
export_parser.add_argument("--format", choices=["json", "csv"])
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Best Practices
|
|
224
|
+
|
|
225
|
+
### Environment Variables
|
|
226
|
+
|
|
227
|
+
- Use for secrets (API keys, passwords, tokens)
|
|
228
|
+
- Use for environment-specific config (URLs, paths)
|
|
229
|
+
- Document all required/optional env vars in help text
|
|
230
|
+
- Validate early and fail fast with clear error messages
|
|
231
|
+
|
|
232
|
+
### Error Handling
|
|
233
|
+
|
|
234
|
+
- Catch specific exceptions, not bare `except:`
|
|
235
|
+
- Log errors before exiting
|
|
236
|
+
- Use appropriate exit codes (0=success, 1=error, 130=interrupted)
|
|
237
|
+
- Include context in error messages
|
|
238
|
+
|
|
239
|
+
### Output
|
|
240
|
+
|
|
241
|
+
- Default to stdout for piping compatibility
|
|
242
|
+
- Use `--output` flag for file output
|
|
243
|
+
- Support `-` as stdout alias
|
|
244
|
+
- Use JSON for structured output, plain text for human output
|
|
245
|
+
|
|
246
|
+
### Logging
|
|
247
|
+
|
|
248
|
+
- Use `logging` module, not `print()`
|
|
249
|
+
- Default to INFO level, `--verbose` for DEBUG
|
|
250
|
+
- Include timestamps in format
|
|
251
|
+
- Log to stderr so stdout stays clean for data
|
|
252
|
+
|
|
253
|
+
## Examples
|
|
254
|
+
|
|
255
|
+
### API Client Script
|
|
256
|
+
|
|
257
|
+
```python
|
|
258
|
+
#!/usr/bin/env python3
|
|
259
|
+
"""Fetch user data from Example API."""
|
|
260
|
+
|
|
261
|
+
import argparse
|
|
262
|
+
import json
|
|
263
|
+
import logging
|
|
264
|
+
import os
|
|
265
|
+
import sys
|
|
266
|
+
import urllib.request
|
|
267
|
+
import urllib.error
|
|
268
|
+
|
|
269
|
+
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
|
|
270
|
+
logger = logging.getLogger(__name__)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def fetch_user(user_id, api_key, base_url):
|
|
274
|
+
"""Fetch a single user by ID."""
|
|
275
|
+
url = f"{base_url}/users/{user_id}"
|
|
276
|
+
headers = {"Authorization": f"Bearer {api_key}"}
|
|
277
|
+
|
|
278
|
+
req = urllib.request.Request(url, headers=headers)
|
|
279
|
+
try:
|
|
280
|
+
with urllib.request.urlopen(req) as response:
|
|
281
|
+
return json.loads(response.read().decode())
|
|
282
|
+
except urllib.error.HTTPError as e:
|
|
283
|
+
logger.error(f"HTTP {e.code}: {e.reason}")
|
|
284
|
+
return None
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def main():
|
|
288
|
+
parser = argparse.ArgumentParser(description="Fetch user data from Example API")
|
|
289
|
+
parser.add_argument("user_id", help="User ID to fetch")
|
|
290
|
+
parser.add_argument("--api-key", default=os.environ.get("EXAMPLE_API_KEY"))
|
|
291
|
+
parser.add_argument("--base-url", default="https://api.example.com/v1")
|
|
292
|
+
args = parser.parse_args()
|
|
293
|
+
|
|
294
|
+
if not args.api_key:
|
|
295
|
+
logger.error("API key required. Set EXAMPLE_API_KEY or use --api-key")
|
|
296
|
+
sys.exit(1)
|
|
297
|
+
|
|
298
|
+
user = fetch_user(args.user_id, args.api_key, args.base_url)
|
|
299
|
+
if user:
|
|
300
|
+
print(json.dumps(user, indent=2))
|
|
301
|
+
else:
|
|
302
|
+
sys.exit(1)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
if __name__ == "__main__":
|
|
306
|
+
main()
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Data Transformation Script
|
|
310
|
+
|
|
311
|
+
```python
|
|
312
|
+
#!/usr/bin/env python3
|
|
313
|
+
"""Transform CSV data to JSON format."""
|
|
314
|
+
|
|
315
|
+
import argparse
|
|
316
|
+
import csv
|
|
317
|
+
import json
|
|
318
|
+
import sys
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def transform_row(row, columns):
|
|
322
|
+
"""Transform a single row to a dictionary."""
|
|
323
|
+
return {col: row.get(col, "") for col in columns}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def main():
|
|
327
|
+
parser = argparse.ArgumentParser(description="Transform CSV to JSON")
|
|
328
|
+
parser.add_argument("input", nargs="?", default="-", help="Input CSV (default: stdin)")
|
|
329
|
+
parser.add_argument("--output", "-o", default="-", help="Output JSON (default: stdout)")
|
|
330
|
+
parser.add_argument("--columns", "-c", help="Comma-separated columns to include")
|
|
331
|
+
parser.add_argument("--pretty", action="store_true", help="Pretty-print JSON output")
|
|
332
|
+
args = parser.parse_args()
|
|
333
|
+
|
|
334
|
+
infile = sys.stdin if args.input == "-" else open(args.input)
|
|
335
|
+
outfile = sys.stdout if args.output == "-" else open(args.output, "w")
|
|
336
|
+
|
|
337
|
+
try:
|
|
338
|
+
reader = csv.DictReader(infile)
|
|
339
|
+
columns = args.columns.split(",") if args.columns else reader.fieldnames
|
|
340
|
+
|
|
341
|
+
results = [transform_row(row, columns) for row in reader]
|
|
342
|
+
|
|
343
|
+
indent = 2 if args.pretty else None
|
|
344
|
+
json.dump(results, outfile, indent=indent)
|
|
345
|
+
outfile.write("\n")
|
|
346
|
+
finally:
|
|
347
|
+
if args.input != "-":
|
|
348
|
+
infile.close()
|
|
349
|
+
if args.output != "-":
|
|
350
|
+
outfile.close()
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
if __name__ == "__main__":
|
|
354
|
+
main()
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## After Script Creation
|
|
358
|
+
|
|
359
|
+
1. **Test the script** with sample data
|
|
360
|
+
2. **Make executable**: `chmod +x script.py`
|
|
361
|
+
3. **Consider adding** to a `scripts/` directory in the project
|
|
362
|
+
4. **Document** in README if it's a project utility
|
|
@@ -39,7 +39,7 @@ Output a contract summary:
|
|
|
39
39
|
|
|
40
40
|
### Phase 2: UI Design
|
|
41
41
|
|
|
42
|
-
After contract agreement, draft the UI layout in
|
|
42
|
+
After contract agreement, draft the UI layout (to be included in the ticket).
|
|
43
43
|
|
|
44
44
|
Include:
|
|
45
45
|
|
|
@@ -106,6 +106,6 @@ UI Layout template:
|
|
|
106
106
|
1. User describes feature idea
|
|
107
107
|
2. Ask clarifying questions (no assumptions)
|
|
108
108
|
3. Draft and agree on contract
|
|
109
|
-
4. Draft UI layout
|
|
109
|
+
4. Draft UI layout
|
|
110
110
|
5. Review UI together, adjust as needed
|
|
111
|
-
6. Only after agreement, proceed to
|
|
111
|
+
6. Only after agreement, proceed to creation of ticket (include UI layout in the ticket)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-creator
|
|
3
|
-
description:
|
|
3
|
+
description: Meta-skill by Anthropic to help guide creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
|
|
4
4
|
license: Complete terms in LICENSE.txt
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# ROADMAP
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
High-level overview of the project, what it does, the main features
|
|
6
|
-
|
|
7
|
-
## Development Workflow
|
|
8
|
-
|
|
9
|
-
1. **Task Planning**
|
|
10
|
-
- Study the existing codebase and understand the current state
|
|
11
|
-
- Use the **planner** agent to break down complex problems and create implementation roadmaps
|
|
12
|
-
- Update `ROADMAP.md` to include the new task under Development
|
|
13
|
-
- Priority tasks should be inserted after the last completed task
|
|
14
|
-
|
|
15
|
-
2. **Ticket Creation**
|
|
16
|
-
- Study the existing codebase and understand the current state
|
|
17
|
-
- Create a new ticket file in the `/tickets` directory
|
|
18
|
-
- Name format: `TICKET-XXX-description.md` (e.g., `TICKET-001-user-auth.md`)
|
|
19
|
-
- Include high-level specifications, relevant files, acceptance criteria, and implementation steps
|
|
20
|
-
- Refer to last completed ticket in the `/tickets` directory for examples
|
|
21
|
-
- Note that completed tickets show checked boxes and summary of changes
|
|
22
|
-
- For new tickets, use empty checkboxes and no summary section
|
|
23
|
-
|
|
24
|
-
3. **Task Implementation**
|
|
25
|
-
- Use the **backend** or **frontend** agent for implementing features, fixing bugs, and optimizing code
|
|
26
|
-
- Follow the specifications in the ticket file
|
|
27
|
-
- Implement features and functionality following project conventions
|
|
28
|
-
- Update step progress within the ticket file after each step
|
|
29
|
-
- Stop after completing each step and wait for further instructions
|
|
30
|
-
|
|
31
|
-
4. **Quality Assurance**
|
|
32
|
-
- Use the **checker** agent for testing, security analysis, and code review
|
|
33
|
-
- Verify all acceptance criteria are met
|
|
34
|
-
- Run tests and ensure code quality standards
|
|
35
|
-
- Document any issues found and their resolutions
|
|
36
|
-
|
|
37
|
-
5. **Roadmap Updates**
|
|
38
|
-
- Mark completed tasks with ✅ in the roadmap
|
|
39
|
-
- Add reference to the ticket file (e.g., `See: /tickets/TICKET-001-user-auth.md`)
|
|
40
|
-
|
|
41
|
-
## Development
|
|
42
|
-
|
|
43
|
-
### Project Setup and Boilerplate
|
|
44
|
-
- [x] Create Claude Code boilerplate structure ✅
|
|
45
|
-
- Set up CLAUDE.md with project instructions
|
|
46
|
-
- Create agents directory with planner, checker, backend, and frontend agents
|
|
47
|
-
- Establish docs, skills, and tickets directories
|
|
48
|
-
- Add README files to all directories
|
|
49
|
-
|
|
50
|
-
### [Add your project tasks here]
|
|
51
|
-
- [ ] Task description
|
|
52
|
-
- Subtask 1
|
|
53
|
-
- Subtask 2
|
|
54
|
-
- See: /tickets/TICKET-XXX-description.md
|
|
55
|
-
|
|
56
|
-
## Future Enhancements
|
|
57
|
-
|
|
58
|
-
[List potential future features and improvements]
|
|
59
|
-
|
|
60
|
-
## Completed Tasks Archive
|
|
61
|
-
|
|
62
|
-
[Move completed sections here to keep the active roadmap clean]
|