.claude/skills/packmind-onboard/SKILL.md
Complete automated onboarding: analyzes codebase, creates package, and generates standards & commands via CLI. Automatic package creation when none exist, user selection when packages are available.
npx skillsauth add PackmindHub/packmind packmind-onboardInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Action skill. Provides complete automated onboarding for Packmind:
Automatic package creation when none exist, user selection when packages are available.
-2, -3, etc.path[:line-line] entries; omit line ranges only when the file isn't text-searchable.Print exactly:
I'll start the Packmind onboarding process. I'll create your first standards and commands and send them to your Packmind organization. This usually takes ~3 minutes.
Get the repository name for package naming:
basename "$(git rev-parse --show-toplevel)"
Remember this as the repository name for package creation in Step 2.
Also run packmind-cli whoami and extract the Host: value from the output. Remember this URL for the completion summary.
Handle package creation or selection.
List available packages:
packmind-cli install --list
Parse the output to get package names.
Auto-create package using repository name:
packmind-cli packages create "${REPO_NAME}-standards"
Print:
No existing packages found — created a new one: ${REPO_NAME}-standards
Ask via AskUserQuestion:
{package-name}?"Ask via AskUserQuestion:
${REPO_NAME}-standards as default)packmind-cli packages create <name>Remember the selected/created package name for later reference.
Print exactly:
packmind-onboard: analyzing codebase (read-only)
Target package: [package-name]
Before analyzing, detect and preserve any existing Packmind/agent configuration.
Glob for markdown in these roots (recursive):
.packmind/**/*.md.claude/**/*.md.agents/**/*.md**/skills/**/*.md**/rules/**/*.mdClassify found files into counts:
.packmind/standards/**/*.md.packmind/commands/**/*.md.claude/, .agents/, or any skills/ or rules/ directory outside .packmindIf any exist, print exactly:
Existing Packmind/agent docs detected:
Standards: [N]
Commands: [M]
Other docs: [P]
No overwrites. New files (if you Export) will be added next to the existing ones.
package.json, pnpm-lock.yaml, yarn.lock, tsconfig.jsonpyproject.toml, requirements.txt, setup.pygo.modCargo.tomlGemfilepom.xml, build.gradle, build.gradle.kts*.csproj, *.slncomposer.jsonsrc/application/, src/domain/, src/infra/src/controllers/, src/services/packages/, apps/Print exactly:
Stack detected (heuristic):
Languages: [..]
Repo shape: [monorepo|single]
Architecture markers: [..|none]
Read each reference file for detailed search patterns, thresholds, and insight templates.
| Analysis | Reference File | Output focus |
|----------|----------------|--------------|
| File Template Consistency | references/file-template-consistency.md | Commands |
| CI/Local Workflow Parity | references/ci-local-workflow-parity.md | Commands |
| Role Taxonomy Drift | references/role-taxonomy-drift.md | Standards |
| Test Data Construction | references/test-data-construction.md | Standards |
For every finding, keep an internal record:
INSIGHT:
title: ...
why_it_matters: ...
confidence: [high|medium|low]
evidence:
- path[:line-line]
where_it_doesnt_apply:
- path[:line-line]
Generate all draft files in one batch, using the formats defined above.
For each Standard insight, create a Markdown file at .packmind/standards/_drafts/<slug>.draft.md:
# Standard Name
What the standard covers and why.
## Scope
Where this standard applies (e.g., 'TypeScript files', 'React components').
## Rules
### Rule starting with action verb
Another rule can follow...
## Examples
### Good
```typescript
// Valid code example
// Invalid code example
### Command Draft Format
For each Command insight, create a Markdown file at `.packmind/commands/_drafts/<slug>.draft.md`:
```markdown
# Command Name
What the command does, why it's useful, and when it's relevant.
## When to Use
- Scenario when this command applies
- Another scenario...
## Checkpoints
- Question to validate before proceeding?
## Steps
### 1. Step Name
What this step does and how to implement it.
```typescript
// Optional code example
Description of next step...
### Generation Rules
- Generate drafts **only from discovered insights** (no invention)
- Use evidence from analysis to populate rules/steps
- Cap output: max **5 Standards** + **5 Commands**
- Never overwrite existing files; append `-2`, `-3`, etc. if slug exists
---
## Step 8 — Present Summary & Confirm
Present the generated draft files and ask for confirmation:
Target package: [package-name] Stack detected: [languages], [monorepo?], [architecture markers] Analyses run: [N] checks
DRAFTS CREATED:
Standards ([N]):
Commands ([M]):
Then ask via AskUserQuestion with three options:
- **Create all now** — Proceed with creating all standards and commands
- **Let me review drafts first** — Pause to allow editing, re-run skill when ready
- **Cancel** — Exit without creating anything
---
## Step 9 — Create Items
### If user selected "Create all now"
**IMPORTANT:** The CLI only accepts JSON playbook files, not markdown. Before calling the CLI, convert each `.draft.md` file to a `.json` file.
#### Standard JSON Schema
Convert the markdown draft to this JSON format:
```json
{
"name": "Standard name (from # heading)",
"description": "What the standard covers (from intro paragraph)",
"scope": "Where it applies (from ## Scope section)",
"rules": [
{
"content": "Rule starting with action verb (from ### Rule headings under ## Rules)",
"examples": {
"positive": "Valid code example (from ### Good section)",
"negative": "Invalid code example (from ### Bad section)",
"language": "TYPESCRIPT"
}
}
]
}
Convert the markdown draft to this JSON format:
{
"name": "Command name (from # heading)",
"summary": "What it does and when (from intro paragraph)",
"whenToUse": ["Scenario 1", "Scenario 2 (from ## When to Use bullets)"],
"contextValidationCheckpoints": ["Question 1? (from ## Checkpoints bullets)"],
"steps": [
{
"name": "Step name (from ### N. Step Name)",
"description": "Step description (from step content)",
"codeSnippet": "Optional code fence content"
}
]
}
For each standard draft:
.draft.md file.packmind/standards/_drafts/<slug>.jsonpackmind-cli standards create .packmind/standards/_drafts/<slug>.json
packmind-cli packages add --to <package-slug> --standard <slug>
For each command draft:
.draft.md file.packmind/commands/_drafts/<slug>.jsonpackmind-cli commands create .packmind/commands/_drafts/<slug>.json
packmind-cli packages add --to <package-slug> --command <slug>
Show progress:
Sending standards and commands to your Packmind organization...
✓ error-handling-pattern
✓ naming-conventions
✗ test-factory-patterns (error: duplicate name exists)
✓ run-full-test-suite
Done: 3 created, 1 failed
Print:
Draft files ready for review at:
- .packmind/standards/_drafts/
- .packmind/commands/_drafts/
Edit them as needed, then re-run this skill to continue.
Exit the skill.
Print:
Onboarding cancelled.
Draft files remain at .packmind/*/_drafts/ if you want to review them later.
Exit the skill.
============================================================
✅ ONBOARDING COMPLETE
============================================================
Package: [package-name]
Created: [N] standards, [M] commands
Your standards and commands have been created and deployed locally.
Next steps:
- Reload your AI coding assistant to start using them
- Visit [host from packmind-cli whoami] to manage your standards and commands
- Run `packmind-cli install [package-slug]` in other repos to distribute them
============================================================
Clean up successful draft files after creation.
============================================================
⚠️ ONBOARDING COMPLETED WITH ERRORS
============================================================
Package: [package-name]
Created: [N] standards, [M] commands
Failed: [X] items
Failed items:
• [item-name]: [error message]
Failed drafts remain in .packmind/*/_drafts/ for review.
You can fix and re-run, or create manually with:
packmind-cli standards create <file>
packmind-cli packages add --to <package-slug> --standard <slug>
packmind-cli commands create <file>
packmind-cli packages add --to <package-slug> --command <slug>
============================================================
Keep failed draft files for user to fix and retry.
If analysis found no patterns:
============================================================
ℹ️ NO PATTERNS DISCOVERED
============================================================
The analysis didn't find enough recurring patterns to generate standards or commands.
This can happen with smaller codebases or projects with very diverse coding styles.
You can try again later as the codebase grows, or create standards manually with:
packmind-cli standards create <file>
============================================================
If packmind-cli packages create fails:
❌ Failed to create package: [error message]
Please check:
- You are logged in: `packmind-cli login`
- Your network connection is working
- The package name is valid
Cannot proceed with onboarding until package is created.
Exit the skill. Do not proceed to analysis.
If CLI commands fail with authentication errors:
❌ Not logged in to Packmind
Please run:
packmind-cli login
Then re-run this skill.
If packmind-cli install --list returns no packages:
Auto-create a package using the repository name.
Since the onboard skill is present, the user has configured an AI agent. Deploy the created artifacts locally using the package selected/created in Step 2:
packmind-cli install <package-slug>
This deploys to agent-specific folders:
| Agent | Standards | Commands |
|-------|-----------|----------|
| Claude | .claude/rules/packmind/standard-[slug].md | .claude/commands/packmind/[slug].md |
| Cursor | .cursor/rules/packmind/standard-[slug].mdc | .cursor/commands/packmind/[slug].mdc |
| Copilot | .github/instructions/packmind-standard-[slug].instructions.md | .github/prompts/packmind-[slug].prompt.md |
Delete the draft files, then print final summary:
============================================================
PUBLISHED & DEPLOYED
============================================================
Standards and commands have been sent to your Packmind organization
and deployed to your AI coding assistant's configuration files.
Standards: [N]
- [Name] (slug: [slug])
→ .packmind/standards/[slug].md
→ [agent-specific path]
Commands: [M]
- [Name] (slug: [slug])
→ .packmind/commands/[slug].md
→ [agent-specific path]
Draft files cleaned up.
============================================================
If user declines (N):
Print:
Draft files ready for review at:
- .packmind/standards/_drafts/
- .packmind/commands/_drafts/
Edit them as needed, then re-run this skill to create them.
tools
Record polished UI demo videos and screenshots of a running web app using Playwright MCP — for client deliverables, release notes, feature walkthroughs, or bug repros. Produces an HD WebM video with chapter markers, a mandatory animated cursor overlay, and a mandatory subtitle bar that narrates each step (positioned deliberately so it never masks the UI being demonstrated), plus full-page screenshots at each step. Use this whenever the user asks to "record a demo", "create a screencast", "make a UI walkthrough video", "document this feature with video", "show the client how X works", "capture screenshots of the app", or anything similar — even when the user only says "make a video" or "take screenshots" in the context of a running frontend. Also use it when the user wants to demonstrate a workflow, generate marketing-quality footage of an app, or produce repeatable visual documentation.
tools
The canonical recipe for starting, checking, and stopping the Packmind local dev stack with Docker Compose — the single source of truth other skills and the Michel agent defer to. Covers bringing the full stack (PostgreSQL, Redis, NestJS API, React/Vite frontend on :4200, MCP server, nginx) up in the background, the init services (dependency install + TypeORM migrations) you must wait on, the critical host-port trap that the API on container port 3000 is NOT exposed to the host and must be reached via the frontend Vite proxy at localhost:4200/api/v0, confirming the API and frontend are actually serving before you depend on them, the persistent-volume gotcha that leaves stale Postgres schema and node_modules behind between runs, building the CLI, and tearing everything down so no container is left blocking the run. Use this whenever you need Packmind running locally — to verify a change, record a UI or CLI demo, hit the API, seed data, or reproduce a bug — and whenever you are about to start or stop `docker compose`. If you are an autonomous agent (e.g. Michel) that started the stack, you MUST use the teardown half before finishing. Prefer this over running `nx serve` on the host for anything that needs the real, containerized stack.
tools
Best practices for creating GitHub pull requests that include inline images — CLI terminal screenshots (from cli-demo-recorder), UI screenshots/videos (from ui-demo-recorder), or any other visual artifact. Use this skill whenever opening or updating a PR that has visual artifacts to embed, or when images aren't rendering in a PR description. Also use it when asked "how do I add screenshots to a PR", "why isn't my image showing", or "embed a demo in the PR".
tools
--- name: michel-create-packmind-dataset description: Seed a local Packmind instance with a realistic dataset — one organization populated with standards, commands, and skills — so an autonomous agent can exercise its own changes against lifelike data instead of an empty app. Use this whenever you need populated Packmind data to verify a change end-to-end: reproducing a bug that only shows with existing artifacts, recording a UI/CLI demo that needs content on screen, smoke-testing a new endpoint