@maggit/claude-workspace 0.1.1

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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +228 -0
  3. package/assets/claude-md/default.md +34 -0
  4. package/assets/claude-md/engineering-exec.md +34 -0
  5. package/assets/claude-md/indie-maker.md +33 -0
  6. package/assets/claude-md/marketing.md +33 -0
  7. package/assets/profiles/default.json +46 -0
  8. package/assets/profiles/engineering-exec.json +42 -0
  9. package/assets/profiles/indie-maker.json +32 -0
  10. package/assets/profiles/marketing.json +27 -0
  11. package/assets/skills/adr/SKILL.md +66 -0
  12. package/assets/skills/apidoc/SKILL.md +78 -0
  13. package/assets/skills/changelog/SKILL.md +54 -0
  14. package/assets/skills/commit/SKILL.md +18 -0
  15. package/assets/skills/completetodo/SKILL.md +75 -0
  16. package/assets/skills/createtodo/SKILL.md +79 -0
  17. package/assets/skills/deadcode/SKILL.md +56 -0
  18. package/assets/skills/debug/SKILL.md +62 -0
  19. package/assets/skills/deps/SKILL.md +66 -0
  20. package/assets/skills/e2e/SKILL.md +68 -0
  21. package/assets/skills/eng-spec/SKILL.md +93 -0
  22. package/assets/skills/envcheck/SKILL.md +65 -0
  23. package/assets/skills/explain/SKILL.md +52 -0
  24. package/assets/skills/landing-page-copy/SKILL.md +95 -0
  25. package/assets/skills/meeting-notes/SKILL.md +90 -0
  26. package/assets/skills/migration/SKILL.md +61 -0
  27. package/assets/skills/openpr/SKILL.md +143 -0
  28. package/assets/skills/opentodos/SKILL.md +79 -0
  29. package/assets/skills/perf/SKILL.md +58 -0
  30. package/assets/skills/prd/SKILL.md +71 -0
  31. package/assets/skills/readme/SKILL.md +55 -0
  32. package/assets/skills/rebase/SKILL.md +59 -0
  33. package/assets/skills/release/SKILL.md +64 -0
  34. package/assets/skills/release-plan/SKILL.md +107 -0
  35. package/assets/skills/requirements/SKILL.md +77 -0
  36. package/assets/skills/seo-brief/SKILL.md +88 -0
  37. package/assets/skills/standup/SKILL.md +48 -0
  38. package/assets/skills/storecontext/SKILL.md +76 -0
  39. package/assets/skills/summary/SKILL.md +72 -0
  40. package/assets/skills/test/SKILL.md +55 -0
  41. package/assets/skills/testcoverage/SKILL.md +57 -0
  42. package/assets/skills/todo/SKILL.md +84 -0
  43. package/assets/templates/DECISION_RECORD_TEMPLATE.md +59 -0
  44. package/assets/templates/ENG_SPEC_TEMPLATE.md +84 -0
  45. package/assets/templates/PRD_TEMPLATE.md +72 -0
  46. package/assets/templates/PROJECT_INDEX_TEMPLATE.md +65 -0
  47. package/assets/templates/WEEKLY_REVIEW_TEMPLATE.md +57 -0
  48. package/assets/vault/README.md +34 -0
  49. package/assets/vault/_index.md +27 -0
  50. package/dist/bin.js +888 -0
  51. package/dist/bin.js.map +1 -0
  52. package/package.json +60 -0
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: explain
3
+ description: "Explain code, architecture, or system behavior in detail. Use when the user says /explain, asks to explain a file, function, module, pattern, or wants to understand how something works in the codebase. Triggers: explain, what does this do, how does this work, walk me through, understand, clarify."
4
+ ---
5
+
6
+ # Code Explainer
7
+
8
+ Explain code clearly at the right level of detail.
9
+
10
+ ## Workflow
11
+
12
+ 1. **Identify the target:**
13
+ - Specific function, class, file, module, or architectural pattern.
14
+ - If the user points at a file, read it fully before explaining.
15
+
16
+ 2. **Determine the audience level:**
17
+ - If not specified, default to an intermediate developer familiar with the language.
18
+ - Adjust terminology and depth accordingly.
19
+
20
+ 3. **Provide a layered explanation:**
21
+
22
+ ### Layer 1: One-line summary
23
+ What does this code do in plain English?
24
+
25
+ ### Layer 2: High-level overview
26
+ - Purpose and responsibility.
27
+ - Where it fits in the larger system (caller/callee relationships).
28
+ - Key inputs and outputs.
29
+
30
+ ### Layer 3: Step-by-step walkthrough
31
+ - Walk through the logic sequentially.
32
+ - Explain non-obvious decisions and patterns used.
33
+ - Note any side effects.
34
+
35
+ ### Layer 4: Details (on request)
36
+ - Edge cases handled.
37
+ - Performance characteristics (time/space complexity).
38
+ - Potential issues or technical debt.
39
+
40
+ 4. **Add context:**
41
+ - Show how other parts of the codebase use this code.
42
+ - Reference related files or modules.
43
+ - Mention relevant design patterns by name.
44
+
45
+ ## Guidelines
46
+
47
+ - Use the code's own variable and function names in the explanation.
48
+ - If the code is poorly written or confusing, say so constructively with improvement suggestions.
49
+ - Use analogies for complex concepts when helpful.
50
+ - For long files, provide a table of contents / map before diving into details.
51
+ - Include a visual diagram (ASCII or Mermaid) for complex data flows or architectures.
52
+ - Don't just restate the code in English — explain the *why*, not just the *what*.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: landing-page-copy
3
+ description: "Write landing page copy. Use when the user says /landing-page-copy, asks to write landing page content, create conversion copy, or draft page copy for a product or service. Triggers: landing-page-copy, landing page, conversion copy, page copy, hero copy, sales page, marketing copy."
4
+ ---
5
+
6
+ # Landing Page Copy
7
+
8
+ ## Purpose
9
+
10
+ Write conversion-focused landing page copy that clearly communicates value, builds trust, and drives visitors toward a specific action. The output is ready-to-use copy organized by page section.
11
+
12
+ ## When to Use
13
+
14
+ - Launching a new product, feature, or service
15
+ - Creating a campaign-specific landing page
16
+ - Rewriting an underperforming page to improve conversion
17
+ - Drafting copy for design mockups or wireframes
18
+
19
+ ## Inputs
20
+
21
+ - **Product or service**: What is being offered
22
+ - **Target audience**: Who this page is for (demographics, pain points, goals)
23
+ - **Primary CTA**: The single most important action visitors should take
24
+ - **Key differentiators**: What makes this offering unique (optional)
25
+ - **Tone**: Professional, casual, bold, technical, etc. (optional, defaults to clear and confident)
26
+ - **Proof points**: Testimonials, stats, logos, case studies available (optional)
27
+
28
+ ## Output Format
29
+
30
+ Produce a markdown document with copy for each page section:
31
+
32
+ ### 1. Hero Section
33
+ - **Headline**: One sentence, 6-12 words. Communicate the core value or transformation. Lead with the benefit, not the feature.
34
+ - **Subheadline**: 1-2 sentences expanding on the headline. Add specificity or address a key objection.
35
+ - **Primary CTA button text**: 2-5 words. Action-oriented, specific to the offer.
36
+ - **Supporting text**: Optional one-liner near the CTA (e.g., "No credit card required").
37
+
38
+ ### 2. Problem Section
39
+ 2-3 short paragraphs or bullets articulating the pain the audience feels. Use the audience's own language. Make the reader feel understood before offering the solution.
40
+
41
+ ### 3. Value Propositions
42
+ 3-4 value propositions, each with:
43
+ - **Heading**: Benefit-driven, 4-8 words
44
+ - **Body**: 2-3 sentences explaining the value and how it is delivered
45
+ - **Optional icon/visual suggestion**: A brief note on what visual could accompany this
46
+
47
+ ### 4. Features and Benefits
48
+ A section connecting features to outcomes. Format each as:
49
+ - **Feature name**: What it is (one phrase)
50
+ - **Benefit**: Why it matters to the user (one sentence)
51
+
52
+ Include 4-6 features. Lead with benefits, support with features.
53
+
54
+ ### 5. Social Proof Section
55
+ Provide copy frameworks for:
56
+ - **Testimonial block**: A placeholder structure with guidance on what makes a strong testimonial (specific result, named person, relevant role)
57
+ - **Stats bar**: 3-4 metrics to highlight (e.g., "10,000+ teams", "99.9% uptime", "4.8/5 rating")
58
+ - **Logo bar**: Guidance on which customer logos to feature and a suggested label (e.g., "Trusted by teams at")
59
+
60
+ ### 6. How It Works
61
+ 3-4 numbered steps explaining the user's journey from signup to value. Keep each step to one sentence. Make the process feel simple.
62
+
63
+ ### 7. Objection Handling
64
+ 2-3 short blocks addressing common concerns or hesitations. Frame as reassurance, not defensiveness.
65
+
66
+ ### 8. FAQ Section
67
+ 5-7 frequently asked questions with concise answers. Cover:
68
+ - Pricing or cost concerns
69
+ - Getting started or setup
70
+ - Comparison to alternatives
71
+ - Security or data concerns
72
+ - Support availability
73
+
74
+ ### 9. Final CTA Section
75
+ - **Headline**: Reinforce the core value or create urgency
76
+ - **Body**: 1-2 sentences summarizing why to act now
77
+ - **CTA button text**: Same as or variation of the primary CTA
78
+ - **Supporting text**: Risk reversal (guarantee, free trial, easy cancellation)
79
+
80
+ ## Example
81
+
82
+ **Input**: "Landing page for a project management tool aimed at remote teams of 10-50 people. CTA is starting a free trial. Key differentiator is async-first design with built-in time zone awareness."
83
+
84
+ **Output**: Hero headline: "Project management built for teams that don't share a time zone." Subheadline addressing async collaboration pain. Value propositions around async updates, time zone-aware scheduling, and reduced meeting load. Features connecting async standups, smart notifications, and deadline adjustment to benefits. Social proof structure with suggested metrics. How it works in 3 steps (create workspace, invite team, run your first async standup). Objection handling for migration concerns, learning curve, and integration with existing tools. FAQ covering pricing, security, Jira comparison, and onboarding support. Final CTA reinforcing the free trial offer.
85
+
86
+ ## Guidelines
87
+
88
+ - Write for scanners: most visitors will not read every word, so make headings and bold text carry the message
89
+ - One page, one goal -- every section should support the primary CTA
90
+ - Use concrete language over abstractions ("save 5 hours a week" beats "boost productivity")
91
+ - Avoid jargon unless the audience expects it
92
+ - Keep paragraphs short: 2-3 sentences maximum
93
+ - Social proof is most effective when it is specific and verifiable
94
+ - The FAQ section does real conversion work -- treat it as objection handling, not an afterthought
95
+ - Write multiple headline options when possible so stakeholders can test
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: meeting-notes
3
+ description: "Create structured meeting notes. Use when the user says /meeting-notes, asks to organize meeting notes, structure a meeting transcript, or document a meeting. Triggers: meeting-notes, meeting notes, meeting recap, meeting summary, organize notes, document meeting."
4
+ ---
5
+
6
+ # Meeting Notes
7
+
8
+ ## Purpose
9
+
10
+ Structure raw meeting content into clear, actionable notes that participants and non-participants can quickly scan. Capture decisions, action items, and follow-ups so nothing falls through the cracks.
11
+
12
+ ## When to Use
13
+
14
+ - Organizing notes during or after a meeting
15
+ - Processing a meeting transcript into a shareable format
16
+ - Creating a record of decisions for future reference
17
+
18
+ ## Inputs
19
+
20
+ - **Meeting content**: Transcript, rough notes, or a description of what was discussed
21
+ - **Meeting metadata**: Title, date, attendees (optional but recommended)
22
+ - **Meeting type**: Standup, planning, retrospective, 1:1, stakeholder review, etc. (optional)
23
+
24
+ ## Output Format
25
+
26
+ Produce a markdown document with the following structure:
27
+
28
+ ### Header Block
29
+
30
+ ```
31
+ # Meeting: [Title]
32
+ **Date**: [Date]
33
+ **Attendees**: [List of names/roles]
34
+ **Duration**: [Length if known]
35
+ **Meeting type**: [Type if known]
36
+ ```
37
+
38
+ ### 1. Agenda
39
+ Numbered list of topics that were planned or actually covered. Mark any skipped items.
40
+
41
+ ### 2. Discussion Points
42
+ For each major topic discussed, create a subsection:
43
+
44
+ #### [Topic Name]
45
+ - Summary of the discussion (2-5 bullets)
46
+ - Key arguments or perspectives raised
47
+ - Any data or evidence referenced
48
+
49
+ ### 3. Decisions
50
+ Numbered list of decisions made during the meeting:
51
+ 1. **[Decision]** -- [Brief rationale]. Agreed by [who, if noted].
52
+
53
+ If no decisions were made, state: "No formal decisions were made in this meeting."
54
+
55
+ ### 4. Action Items
56
+ Table format for clear ownership and tracking:
57
+
58
+ | # | Action Item | Owner | Due Date | Status |
59
+ |---|-------------|-------|----------|--------|
60
+ | 1 | | | | Open |
61
+
62
+ ### 5. Follow-ups
63
+ - Topics deferred to future meetings
64
+ - Information someone agreed to look up or share
65
+ - Meetings or discussions that need to be scheduled
66
+
67
+ ### 6. Parking Lot
68
+ Items raised but intentionally set aside for later. These prevent good ideas from being lost while keeping the current meeting focused.
69
+
70
+ ## Example
71
+
72
+ **Input**: Rough notes from a sprint planning meeting: "talked about auth bugs -- maria will fix the token refresh issue by wednesday. discussed new search feature, agreed to use elasticsearch over solr. need to figure out timeline for search. jake mentioned concerns about test coverage. pushed mobile discussion to next week."
73
+
74
+ **Output**:
75
+ - Header: Sprint Planning, today's date, attendees mentioned
76
+ - Discussion Points: Auth bugs (token refresh identified as root cause), Search feature (Elasticsearch vs Solr debate), Test coverage concerns, Mobile (deferred)
77
+ - Decisions: Use Elasticsearch for search implementation
78
+ - Action Items: Maria to fix token refresh by Wednesday, team to determine search timeline
79
+ - Follow-ups: Mobile discussion next week, Jake to propose test coverage targets
80
+ - Parking Lot: Mobile app planning
81
+
82
+ ## Guidelines
83
+
84
+ - Capture the substance of discussions, not a verbatim transcript
85
+ - Every action item must have an owner -- if none was assigned, flag it as "Owner: TBD"
86
+ - Keep discussion summaries neutral; do not editorialize
87
+ - When the input is a rough transcript, clean up language but preserve meaning
88
+ - Group related discussion points rather than listing them chronologically
89
+ - Distinguish between decisions (firm commitments) and sentiments (general agreement without a firm commitment)
90
+ - If attendees are not provided, infer from names mentioned and note that the list may be incomplete
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: migration
3
+ description: "Generate database or code migration scripts. Use when the user says /migration, asks to create a migration, add a database column, change a schema, migrate data, or refactor code across a codebase. Triggers: migration, migrate, schema change, add column, alter table, database migration, data migration, code migration, upgrade path."
4
+ ---
5
+
6
+ # Migration Generator
7
+
8
+ Generate safe, reversible migration scripts for databases and code.
9
+
10
+ ## Workflow
11
+
12
+ 1. **Detect the migration framework:**
13
+ - **SQL/ORM migrations**: Prisma, Drizzle, Knex, TypeORM, Sequelize, Alembic, Django, Rails ActiveRecord, Flyway, Liquibase, golang-migrate.
14
+ - **Schema files**: Check for `prisma/schema.prisma`, `drizzle/`, `migrations/`, `alembic/`, `db/migrate/`, etc.
15
+ - If no framework detected, generate raw SQL migrations.
16
+
17
+ 2. **Understand the change:**
18
+ - What is being added, modified, or removed?
19
+ - What existing data needs to be preserved or transformed?
20
+ - Are there foreign key or index implications?
21
+
22
+ 3. **Generate the migration:**
23
+
24
+ ### For Schema Migrations (DDL)
25
+
26
+ - **Up migration**: Apply the change.
27
+ - **Down migration**: Reverse the change (when possible).
28
+ - Use the framework's migration generator if available (e.g., `npx prisma migrate dev`, `rails generate migration`).
29
+
30
+ ### For Data Migrations
31
+
32
+ - Batch large updates to avoid locking.
33
+ - Include progress logging for long-running migrations.
34
+ - Handle null values and edge cases.
35
+ - Make data migrations idempotent when possible.
36
+
37
+ 4. **Safety checks:**
38
+ - Will this lock a large table? Warn about downtime.
39
+ - Is the migration reversible? If not, document why.
40
+ - Does it handle zero-downtime deployment? (e.g., add column → backfill → add constraint, not all at once).
41
+ - Are there dependent migrations that need to run first?
42
+
43
+ 5. **Generate a migration plan** for complex changes:
44
+
45
+ ```
46
+ Step 1: Add new nullable column (no downtime)
47
+ Step 2: Backfill data (background job)
48
+ Step 3: Update application code to write to new column
49
+ Step 4: Add NOT NULL constraint
50
+ Step 5: Remove old column (next release)
51
+ ```
52
+
53
+ ## Guidelines
54
+
55
+ - Always generate both up and down migrations when the framework supports it.
56
+ - Use transactions where supported (PostgreSQL, not MySQL DDL).
57
+ - Name migrations descriptively: `add_email_verified_to_users`, not `migration_042`.
58
+ - For destructive changes (drop column, drop table), add a confirmation warning.
59
+ - Consider the deploy strategy: can the old and new code run simultaneously?
60
+ - Test migrations against a copy of production data when possible.
61
+ - Include comments explaining *why* the migration exists.
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: openpr
3
+ description: "Generate a PR description and open a pull request. Use when the user says /openpr, asks to open a PR, create a pull request, or push and open a PR. Triggers: openpr, open pr, pull request, create pr, push and pr."
4
+ ---
5
+
6
+ # Open PR
7
+
8
+ Generate a comprehensive pull request description based on all commits on the current branch (compared to the default base branch), then open the PR using the GitHub CLI (`gh`).
9
+
10
+ ## Workflow
11
+
12
+ ### 1. Detect the Base Branch
13
+
14
+ ```bash
15
+ # Try to detect the default branch (main or master)
16
+ git remote show origin | grep "HEAD branch" | awk '{print $NF}'
17
+ ```
18
+
19
+ Store the result as `BASE_BRANCH`.
20
+
21
+ ### 2. Get the Current Branch Name
22
+
23
+ ```bash
24
+ git branch --show-current
25
+ ```
26
+
27
+ Store the result as `CURRENT_BRANCH`. If the current branch is the same as `BASE_BRANCH`, stop and inform the user they need to be on a feature branch.
28
+
29
+ ### 3. Gather Commit History
30
+
31
+ ```bash
32
+ git log ${BASE_BRANCH}..${CURRENT_BRANCH} --pretty=format:"%h %s" --reverse
33
+ ```
34
+
35
+ This gives the list of all commits on this branch that are not on the base branch, in chronological order.
36
+
37
+ ### 4. Gather the Full Diff Summary
38
+
39
+ ```bash
40
+ git diff ${BASE_BRANCH}...${CURRENT_BRANCH} --stat
41
+ ```
42
+
43
+ This gives a summary of files changed, insertions, and deletions.
44
+
45
+ ### 5. Optionally Read Detailed Diffs
46
+
47
+ If the diff is small enough (under ~2000 lines), also read the full diff for richer context:
48
+
49
+ ```bash
50
+ git diff ${BASE_BRANCH}...${CURRENT_BRANCH}
51
+ ```
52
+
53
+ If the diff is too large, rely on the commit messages and `--stat` output only.
54
+
55
+ ### 6. Generate the PR Title
56
+
57
+ - Derive a concise, descriptive PR title from the overall theme of the changes.
58
+ - Format: imperative mood, no prefix, max ~72 characters.
59
+ - Examples: `Add user authentication flow`, `Fix race condition in job scheduler`, `Refactor database connection pooling`.
60
+
61
+ ### 7. Generate the PR Description
62
+
63
+ Use the following markdown template. Fill in every section thoughtfully based on the commits and diff:
64
+
65
+ ```markdown
66
+ ## Summary
67
+
68
+ <!-- 2-4 sentence high-level overview of what this PR does and why -->
69
+
70
+ ## Changes
71
+
72
+ <!-- Grouped list of meaningful changes. Group by area/theme, not by commit.
73
+ Each item should describe WHAT changed and WHY, not just repeat commit messages. -->
74
+
75
+ - **Area/Module**: Description of change
76
+ - **Area/Module**: Description of change
77
+
78
+ ## How to Test
79
+
80
+ <!-- Step-by-step instructions a reviewer can follow to verify the changes work -->
81
+
82
+ 1. Step one
83
+ 2. Step two
84
+
85
+ ## Notes for Reviewers
86
+
87
+ <!-- Optional: anything reviewers should pay attention to, open questions,
88
+ trade-offs made, or follow-up work planned -->
89
+ ```
90
+
91
+ **Guidelines for the description:**
92
+
93
+ - **Summary**: Explain the motivation and the approach. A reviewer who reads only this section should understand the PR.
94
+ - **Changes**: Group related changes together by theme or module. Do NOT just list commits verbatim — synthesize them into meaningful bullets. If a commit was a fixup or correction of a previous commit on the branch, merge them into one bullet.
95
+ - **How to Test**: Be specific. Include commands, URLs, or user flows. If there are automated tests, mention how to run them.
96
+ - **Notes for Reviewers**: Include anything unusual — risky areas, things you're unsure about, intentional shortcuts, or planned follow-ups. If there's nothing noteworthy, omit this section.
97
+
98
+ ### 8. Confirm with the User
99
+
100
+ Before opening the PR, display the generated title and description to the user and ask for confirmation or edits.
101
+
102
+ ### 9. Push and Open the PR
103
+
104
+ Once confirmed:
105
+
106
+ ```bash
107
+ # Ensure the branch is pushed
108
+ git push -u origin ${CURRENT_BRANCH}
109
+
110
+ # Open the PR via GitHub CLI
111
+ gh pr create --title "<GENERATED_TITLE>" --body "<GENERATED_DESCRIPTION>" --base ${BASE_BRANCH}
112
+ ```
113
+
114
+ If `gh` is not installed or not authenticated, inform the user and provide the generated title and description so they can copy/paste it manually.
115
+
116
+ ### 10. Share the PR Link
117
+
118
+ After the PR is created, display the PR URL to the user.
119
+
120
+ ## Edge Cases
121
+
122
+ - **No commits on branch**: Inform the user there are no changes to open a PR for.
123
+ - **Unpushed base branch changes**: Warn the user if the local base branch is behind remote.
124
+ - **Draft PRs**: If the user says `/openpr draft`, add the `--draft` flag to `gh pr create`.
125
+ - **Existing PR**: If a PR already exists for this branch, inform the user and provide the link. Check with `gh pr view --json url`.
126
+ - **Merge conflicts**: If the branch has conflicts with base, warn the user but still allow PR creation.
127
+
128
+ ## Dependencies
129
+
130
+ - `git` (required)
131
+ - `gh` — GitHub CLI (required for automatic PR creation; graceful fallback if missing)
132
+
133
+ ## Examples
134
+
135
+ **User input:**
136
+ ```
137
+ /openpr
138
+ ```
139
+
140
+ **User input (draft):**
141
+ ```
142
+ /openpr draft
143
+ ```
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: opentodos
3
+ description: "Show the latest open TODO items for review and discussion. Use when the user says /opentodos, asks to see pending todos, review open tasks, what's left to do, or wants to pick what to work on next. Triggers: opentodos, open todos, pending tasks, what's left, remaining tasks, show todos, review tasks, backlog."
4
+ ---
5
+
6
+ # Open TODOs
7
+
8
+ Retrieve and display the latest open (unchecked) TODO items from `ContextDB/todos/` so the user can decide what to work on.
9
+
10
+ ## Workflow
11
+
12
+ 1. **List all TODO files:**
13
+ - List files in `ContextDB/todos/`.
14
+ - **Immediately skip** files prefixed with `completed-` — these are fully done.
15
+ - Sort remaining files by date (newest first), extracted from the filename `YYYY-MM-DD-*-todo.md`.
16
+
17
+ 2. **Collect open items (up to 10):**
18
+ - Starting from the **most recent** active file, read it and extract all `- [ ]` lines.
19
+ - Collect open items into a list, tracking which file each came from.
20
+ - If the current file yields fewer than 10 open items, move to the **next most recent** file and continue.
21
+ - Stop once you have 10 open items, or you've exhausted all active files.
22
+
23
+ 3. **Handle fully-completed files found during scanning:**
24
+ - If while reading a file you discover it has **zero** `- [ ]` items (all are `- [x]`), rename it:
25
+ - From: `2026-02-05-backend-todo.md`
26
+ - To: `completed-2026-02-05-backend-todo.md`
27
+ - Log this to the user: "Archived `2026-02-05-backend-todo.md` — all items completed."
28
+ - Continue scanning the next file.
29
+
30
+ 4. **Present the open items:**
31
+
32
+ ```
33
+ ## Open TODOs (10 most recent)
34
+
35
+ ### From `2026-02-07-auth-refactor-todo.md` (3 open)
36
+ 1. [ ] Add login endpoint in `app/api/auth/route.ts`
37
+ 2. [ ] Create JWT utility in `lib/jwt.ts`
38
+ 3. [ ] Write auth integration tests
39
+
40
+ ### From `2026-02-06-general-todo.md` (4 open)
41
+ 4. [ ] Set up CI/CD pipeline
42
+ 5. [ ] Configure staging environment
43
+ 6. [ ] Add error monitoring (Sentry)
44
+ 7. [ ] Review PR #42
45
+
46
+ ### From `2026-02-05-ui-todo.md` (3 open)
47
+ 8. [ ] Implement dark mode toggle
48
+ 9. [ ] Fix mobile nav breakpoint
49
+ 10. [ ] Add loading skeletons to dashboard
50
+
51
+ ---
52
+ Showing 10 of 15 open items across 3 files.
53
+ Use `/opentodos` again to see the next batch, or tell me which items to work on.
54
+ ```
55
+
56
+ 5. **Prompt the user for a decision:**
57
+ - Ask which items they want to tackle now.
58
+ - They can refer to items by number, description, or file.
59
+ - Once they pick, proceed with the work (or create a focused plan).
60
+
61
+ ## Pagination
62
+
63
+ - Each invocation shows **10 open items**.
64
+ - If the user asks to "see more" or "next page", skip the first 10 and show the next 10.
65
+ - Track the offset by counting items shown so far in the conversation.
66
+
67
+ ## Edge Cases
68
+
69
+ - **No open items at all:** "All TODOs are completed! No open items found in `ContextDB/todos/`."
70
+ - **No TODO files exist:** "No TODO files found in `ContextDB/todos/`. Use `/createtodo` to create one."
71
+ - **Only completed files exist:** Same as no open items — mention that all files have been archived.
72
+
73
+ ## Guidelines
74
+
75
+ - Present items clearly with numbers for easy reference.
76
+ - Show which file each item comes from so the user has context.
77
+ - Don't modify any items during this read-only operation (except renaming fully-completed files).
78
+ - If an item has priority markers (`[P0]`, `[P1]`) or categories (`**backend**`), preserve them in the display.
79
+ - Keep the output scannable — the user should be able to pick a task in under 30 seconds.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: perf
3
+ description: "Analyze and optimize code performance. Use when the user says /perf, asks about performance, wants to optimize slow code, profile a bottleneck, reduce memory usage, or improve response times. Triggers: perf, performance, slow, optimize, bottleneck, profile, memory, latency, throughput, speed up."
4
+ ---
5
+
6
+ # Performance Analyzer
7
+
8
+ Identify and resolve performance bottlenecks.
9
+
10
+ ## Workflow
11
+
12
+ 1. **Understand the problem:**
13
+ - What is slow? (startup, specific endpoint, rendering, query, build)
14
+ - What are the symptoms? (high latency, high CPU, high memory, timeouts)
15
+ - What is the target? (e.g., "under 200ms", "half the memory")
16
+
17
+ 2. **Profile before optimizing:**
18
+ - Identify the hotspot. Never optimize blindly.
19
+ - Use language-appropriate profiling:
20
+ - **Python**: `cProfile`, `py-spy`, `memory_profiler`, `time.perf_counter`
21
+ - **Node.js**: `--prof`, `clinic.js`, `console.time`, `perf_hooks`
22
+ - **Go**: `pprof`, `go test -bench`
23
+ - **Rust**: `cargo bench`, `flamegraph`
24
+ - **General**: `time` command, `hyperfine` for benchmarks
25
+
26
+ 3. **Analyze the code for common issues:**
27
+
28
+ ### Common Performance Issues
29
+
30
+ | Category | What to look for |
31
+ |----------|-----------------|
32
+ | **Algorithm** | O(n^2) or worse where O(n log n) exists, unnecessary sorting |
33
+ | **Database** | N+1 queries, missing indexes, SELECT *, no pagination |
34
+ | **I/O** | Sequential where parallel is possible, no batching, no streaming |
35
+ | **Memory** | Large object copies, no generators/iterators, memory leaks, unbounded caches |
36
+ | **Caching** | Repeated expensive computations, no memoization, cache stampede |
37
+ | **Rendering** | Unnecessary re-renders, large DOM, no virtualization |
38
+ | **Network** | No compression, no connection pooling, chatty APIs |
39
+ | **Build** | No tree-shaking, large bundles, no code splitting |
40
+
41
+ 4. **Propose fixes ranked by impact:**
42
+ - Estimate improvement for each fix.
43
+ - Start with the highest-impact, lowest-effort changes.
44
+ - Include before/after benchmarks when possible.
45
+
46
+ 5. **Verify improvements:**
47
+ - Run benchmarks before and after.
48
+ - Check for regressions in correctness.
49
+ - Monitor for changes in memory usage.
50
+
51
+ ## Guidelines
52
+
53
+ - Measure first, optimize second. Show numbers.
54
+ - The biggest gains are usually algorithmic, not micro-optimizations.
55
+ - Consider trade-offs: readability vs speed, memory vs CPU, latency vs throughput.
56
+ - Don't optimize code that runs rarely — focus on hot paths.
57
+ - Suggest caching strategies where appropriate but warn about invalidation complexity.
58
+ - For database issues, show the query plan (`EXPLAIN ANALYZE`).
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: prd
3
+ description: "Generate a Product Requirements Document. Use when the user says /prd, asks to create a PRD, define product requirements, or spec out a feature. Triggers: prd, product requirements, product spec, feature spec, requirements document."
4
+ ---
5
+
6
+ # Product Requirements Document (PRD)
7
+
8
+ ## Purpose
9
+
10
+ Generate a structured Product Requirements Document that clearly defines what needs to be built, why it matters, and how success will be measured. The PRD serves as the source of truth aligning product, engineering, and design.
11
+
12
+ ## When to Use
13
+
14
+ - Kicking off a new feature or product initiative
15
+ - Formalizing a rough idea into a concrete proposal
16
+ - Aligning stakeholders before engineering work begins
17
+
18
+ ## Inputs
19
+
20
+ - **Product or feature name**: What is being built
21
+ - **Problem context**: Background on the user pain point or business need
22
+ - **Target audience**: Who this is for
23
+ - **Any existing constraints**: Technical limitations, timeline, budget (optional)
24
+
25
+ ## Output Format
26
+
27
+ Produce a markdown document with the following sections:
28
+
29
+ ### 1. Overview
30
+ A one-paragraph summary of the feature or product and its purpose.
31
+
32
+ ### 2. Problem Statement
33
+ Describe the problem from the user's perspective. Include evidence or context that validates the problem exists. Be specific about who is affected and how.
34
+
35
+ ### 3. User Stories
36
+ List 3-8 user stories in the format:
37
+ > As a [role], I want [capability] so that [benefit].
38
+
39
+ Prioritize each story as P0 (must-have), P1 (should-have), or P2 (nice-to-have).
40
+
41
+ ### 4. Functional Requirements
42
+ Numbered list of specific behaviors the system must support. Each requirement should be testable and unambiguous.
43
+
44
+ ### 5. Non-Functional Requirements
45
+ Cover relevant areas: performance targets, scalability, security, accessibility, compliance, and reliability expectations.
46
+
47
+ ### 6. Success Metrics
48
+ Define 3-5 measurable outcomes that indicate the feature is working. Use the format: Metric | Target | Measurement Method.
49
+
50
+ ### 7. Scope
51
+ Clearly state what is **in scope** and **out of scope** for this initiative. Call out deferred items explicitly.
52
+
53
+ ### 8. Timeline Considerations
54
+ Note any deadlines, phasing suggestions, or dependencies that affect scheduling. If unknown, state that timeline is TBD and list factors that will influence it.
55
+
56
+ ### 9. Open Questions
57
+ List unresolved questions that need stakeholder input before finalizing.
58
+
59
+ ## Example
60
+
61
+ **Input**: "We need a way for users to export their dashboard data as PDF reports."
62
+
63
+ **Output**: A full PRD document covering the problem (users cannot share dashboard insights with stakeholders who lack platform access), user stories (export single dashboard, schedule recurring exports, customize report branding), functional requirements (PDF generation, template selection, email delivery), non-functional requirements (generation under 30 seconds, support for dashboards up to 50 widgets), success metrics (adoption rate, export completion rate, support ticket reduction), and clear scope boundaries (v1 excludes CSV export and API-based generation).
64
+
65
+ ## Guidelines
66
+
67
+ - Write requirements that are specific and testable, not vague aspirations
68
+ - Separate what the system does from how it does it -- leave implementation to the eng spec
69
+ - Flag assumptions explicitly rather than embedding them silently
70
+ - Keep the document scannable: use bullets, tables, and short paragraphs
71
+ - Default to a single-phase scope unless the user requests phasing