aiblueprint-cli 1.4.103 → 1.4.105

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 (33) hide show
  1. package/README.md +2 -7
  2. package/agents-config/skills/audit-skills/SKILL.md +79 -0
  3. package/agents-config/skills/audit-skills/agents/openai.yaml +7 -0
  4. package/agents-config/skills/audit-skills/scripts/audit-skills.mjs +346 -0
  5. package/package.json +1 -1
  6. package/agents-config/skills/audit/SKILL.md +0 -126
  7. package/agents-config/skills/audit/agents/openai.yaml +0 -10
  8. package/agents-config/skills/audit/assets/codex-icon.svg +0 -20
  9. package/agents-config/skills/commit/SKILL.md +0 -44
  10. package/agents-config/skills/commit/agents/openai.yaml +0 -10
  11. package/agents-config/skills/commit/assets/codex-icon.svg +0 -17
  12. package/agents-config/skills/create-pr/SKILL.md +0 -55
  13. package/agents-config/skills/create-pr/agents/openai.yaml +0 -10
  14. package/agents-config/skills/create-pr/assets/codex-icon.svg +0 -17
  15. package/agents-config/skills/oneshot/SKILL.md +0 -44
  16. package/agents-config/skills/oneshot/agents/openai.yaml +0 -10
  17. package/agents-config/skills/oneshot/assets/codex-icon.svg +0 -18
  18. package/agents-config/skills/tools/SKILL.md +0 -149
  19. package/agents-config/skills/use-artifacts/SKILL.md +0 -211
  20. package/agents-config/skills/use-artifacts/agents/openai.yaml +0 -7
  21. package/agents-config/skills/use-artifacts/assets/codex-icon.svg +0 -18
  22. package/agents-config/skills/use-artifacts/assets/local-runtime.js +0 -299
  23. package/agents-config/skills/use-artifacts/scripts/create_artifact.py +0 -317
  24. package/agents-config/skills/use-delegate/SKILL.md +0 -97
  25. package/agents-config/skills/use-delegate/agents/openai.yaml +0 -10
  26. package/agents-config/skills/use-delegate/assets/codex-icon.svg +0 -20
  27. package/agents-config/skills/use-delegate/references/models.md +0 -32
  28. package/agents-config/skills/use-goal/SKILL.md +0 -121
  29. package/agents-config/skills/use-goal/agents/openai.yaml +0 -7
  30. package/agents-config/skills/use-goal/assets/codex-icon.svg +0 -18
  31. package/agents-config/skills/use-goal/references/claude-code-goal.md +0 -65
  32. package/agents-config/skills/use-goal/references/codex-goal.md +0 -70
  33. package/agents-config/skills/use-goal/references/verification-harnesses.md +0 -108
@@ -1,10 +0,0 @@
1
- interface:
2
- display_name: "Commit"
3
- short_description: "Quick commit and push with minimal, clean messages"
4
- icon_small: "./assets/codex-icon.svg"
5
- icon_large: "./assets/codex-icon.svg"
6
- brand_color: "#4BD0FC"
7
- default_prompt: "Use $commit to help with this task."
8
-
9
- policy:
10
- allow_implicit_invocation: false
@@ -1,17 +0,0 @@
1
- <!-- @license lucide-static v1.24.0 - ISC -->
2
- <svg role="img" aria-label="commit skill icon"
3
- class="lucide lucide-git-commit-horizontal"
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="128"
6
- height="128"
7
- viewBox="0 0 24 24"
8
- fill="none"
9
- stroke="#F5F5F5"
10
- stroke-width="2"
11
- stroke-linecap="round"
12
- stroke-linejoin="round"
13
- >
14
- <circle cx="12" cy="12" r="3" />
15
- <line x1="3" x2="9" y1="12" y2="12" />
16
- <line x1="15" x2="21" y1="12" y2="12" />
17
- </svg>
@@ -1,55 +0,0 @@
1
- ---
2
- name: create-pr
3
- description: Create and push PR with auto-generated title and description
4
- model: haiku
5
- allowed-tools: Bash(git :*), Bash(gh :*)
6
- disable-model-invocation: true
7
- allow_implicit_invocation: false
8
- ---
9
-
10
- # Create PR
11
-
12
- Create pull request with concise, meaningful description.
13
-
14
- ## Context
15
-
16
- - Current branch: !`git branch --show-current`
17
- - Working tree status: !`git status --short`
18
- - Recent commits: !`git log --oneline -5`
19
- - Remote tracking: !`git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "none"`
20
-
21
- ## Workflow
22
-
23
- 1. **Verify**: Check `git status` and current branch
24
- 2. **Branch Safety**: **CRITICAL** - If on main/master, create descriptive branch from changes
25
- 3. **Push**: `git push -u origin HEAD`
26
- 4. **Analyze**: `git diff origin/main...HEAD --stat`
27
- 5. **Generate PR**:
28
- - Title: One-line summary (max 72 chars)
29
- - Body: Bullet points of key changes
30
- 6. **Submit**: `gh pr create --title "..." --body "..."`
31
- 7. **Return**: Display PR URL
32
-
33
- ## PR Format
34
-
35
- ```markdown
36
- ## Summary
37
-
38
- • [Main change or feature]
39
- • [Secondary changes]
40
- • [Any fixes included]
41
-
42
- ## Type
43
-
44
- [feat/fix/refactor/docs/chore]
45
- ```
46
-
47
- ## Rules
48
-
49
- - NO verbose descriptions
50
- - NO "Generated with" signatures
51
- - Auto-detect base branch (main/master/develop)
52
- - Use HEREDOC for multi-line body
53
- - If PR exists, return existing URL
54
-
55
- User: $ARGUMENTS
@@ -1,10 +0,0 @@
1
- interface:
2
- display_name: "Create Pr"
3
- short_description: "Create and push PR with auto-generated title and description"
4
- icon_small: "./assets/codex-icon.svg"
5
- icon_large: "./assets/codex-icon.svg"
6
- brand_color: "#951556"
7
- default_prompt: "Use $create-pr to help with this task."
8
-
9
- policy:
10
- allow_implicit_invocation: false
@@ -1,17 +0,0 @@
1
- <!-- @license lucide-static v1.24.0 - ISC -->
2
- <svg role="img" aria-label="create-pr skill icon"
3
- class="lucide lucide-git-merge"
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="128"
6
- height="128"
7
- viewBox="0 0 24 24"
8
- fill="none"
9
- stroke="#F5F5F5"
10
- stroke-width="2"
11
- stroke-linecap="round"
12
- stroke-linejoin="round"
13
- >
14
- <circle cx="18" cy="18" r="3" />
15
- <circle cx="6" cy="6" r="3" />
16
- <path d="M6 21V9a9 9 0 0 0 9 9" />
17
- </svg>
@@ -1,44 +0,0 @@
1
- ---
2
- name: oneshot
3
- description: Implement one focused code change quickly with minimal exploration and targeted validation. Use for small bug fixes, single feature edits, config updates, or explicit "$oneshot" requests.
4
- disable-model-invocation: true
5
- metadata:
6
- opencode/autoinvoke: "false"
7
- opencode/slash: "true"
8
- argument-hint: <feature-description>
9
- ---
10
-
11
- # OneShot
12
-
13
- Use this for one narrow implementation task. Optimize for the shortest reliable path to a working, verified change.
14
-
15
- ## Workflow
16
-
17
- ### 1. Scope
18
-
19
- - Identify the exact target and likely files with `rg` / `rg --files`.
20
- - Read only the files needed to edit safely, usually 2-5 plus nearby examples.
21
- - Look up docs only when API, version, or current behavior may be stale.
22
-
23
- ### 2. Implement
24
-
25
- - Edit as soon as the existing pattern is clear.
26
- - Keep the diff minimal and local to the request.
27
- - Do not refactor, rename, redesign, rewrite docs, or clean adjacent code unless required.
28
- - Prefer existing helpers, conventions, and package scripts.
29
-
30
- ### 3. Validate
31
-
32
- - Run the smallest meaningful checks: targeted tests, touched-package lint/typecheck, and formatter when expected.
33
- - If a check fails, fix only failures caused by this change and rerun.
34
- - Run broader checks only for shared/high-risk code or when the user asks.
35
-
36
- ## Stop Rules
37
-
38
- - Do not expand into adjacent improvements.
39
- - Ask only when a missing decision blocks safe implementation.
40
- - If blocked after two concrete attempts, report the blocker, evidence, and the next exact option.
41
-
42
- ## Final Response
43
-
44
- Report changed files, validation commands/results, and any skipped checks with reason.
@@ -1,10 +0,0 @@
1
- interface:
2
- display_name: "Oneshot"
3
- short_description: "Implement one focused code change quickly with minimal..."
4
- icon_small: "./assets/codex-icon.svg"
5
- icon_large: "./assets/codex-icon.svg"
6
- brand_color: "#CF80EF"
7
- default_prompt: "Use $oneshot to help with this task."
8
-
9
- policy:
10
- allow_implicit_invocation: false
@@ -1,18 +0,0 @@
1
- <!-- @license lucide-static v1.24.0 - ISC -->
2
- <svg role="img" aria-label="oneshot skill icon"
3
- class="lucide lucide-sparkles"
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="128"
6
- height="128"
7
- viewBox="0 0 24 24"
8
- fill="none"
9
- stroke="#F5F5F5"
10
- stroke-width="2"
11
- stroke-linecap="round"
12
- stroke-linejoin="round"
13
- >
14
- <path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" />
15
- <path d="M20 2v4" />
16
- <path d="M22 4h-4" />
17
- <circle cx="4" cy="20" r="2" />
18
- </svg>
@@ -1,149 +0,0 @@
1
- ---
2
- name: tools
3
- description: Reference document listing all recommended tools and libraries for AIBlueprint development
4
- ---
5
-
6
- # AIBlueprint Tools & Libraries Reference
7
-
8
- This document lists all recommended tools and libraries for development with the AIBlueprint stack. Use this as a reference when making architecture decisions.
9
-
10
- ## Quick Reference Table
11
-
12
- | Name | Description | Tags |
13
- |------|-------------|------|
14
- | [Next.js](https://nextjs.org/) | Main React framework with App Router | `framework`, `frontend`, `backend` |
15
- | [TanStack Query](https://tanstack.com/query) | Data fetching & caching for API routes | `frontend`, `library` |
16
- | [Zustand](https://zustand.docs.pmnd.rs/) | Client-side state management | `frontend`, `library` |
17
- | [nuqs](https://nuqs.47ng.com/) | URL state management | `frontend`, `library` |
18
- | [shadcn/ui](https://ui.shadcn.com/) | Customizable React components | `frontend`, `library` |
19
- | [Convex](https://www.convex.dev/) | Realtime database & backend | `backend`, `database`, `realtime` |
20
- | [Liveblocks](https://liveblocks.io/) | Multiplayer collaboration features | `frontend`, `backend`, `realtime` |
21
- | [Neon](https://neon.tech/) | Serverless PostgreSQL | `backend`, `database`, `sql` |
22
- | [Supabase](https://supabase.com/) | PostgreSQL + Backend as a Service | `backend`, `database`, `sql` |
23
- | [Prisma](https://prisma.io/) | Type-safe ORM (recommended for teams) | `backend`, `database`, `orm` |
24
- | [Drizzle ORM](https://orm.drizzle.team/) | Lightweight type-safe ORM | `backend`, `database`, `orm` |
25
- | [Better Auth](https://www.better-auth.com/) | Complete authentication solution | `backend`, `library` |
26
- | [Inngest](https://www.inngest.com/) | Background jobs & workflows | `backend`, `service` |
27
- | [Next Safe Action](https://next-safe-action.dev/) | Secure Server Actions | `backend`, `library` |
28
- | [next-zod-route](https://github.com/Melvynx/next-zod-route) | Secure API Routes | `backend`, `library` |
29
- | [Zod](https://zod.dev/) | Runtime validation (v4) | `library`, `validation` |
30
- | [AI SDK](https://ai-sdk.dev/) | LLM integration wrapper | `backend`, `frontend`, `library` |
31
- | [up-fetch](https://github.com/L-Blondy/up-fetch) | Modern fetch wrapper | `backend`, `frontend`, `library` |
32
- | [Vitest](https://vitest.dev/) | Fast unit testing | `testing`, `library` |
33
- | [Playwright](https://playwright.dev/) | E2E testing | `testing`, `library` |
34
- | [Sentry](https://sentry.io/) | Error tracking & monitoring | `monitoring`, `service` |
35
- | [Resend](https://resend.com/) | Developer email service | `email`, `service` |
36
- | [React Email](https://react.email/) | Email templates in React | `email`, `library` |
37
- | [AWS SES](https://aws.amazon.com/ses/) | High-volume email | `email`, `service` |
38
- | [Stripe](https://stripe.com/) | Complete payment solution | `payment`, `service` |
39
- | [Lemon Squeezy](https://lemonsqueezy.com/) | Payments with tax handling | `payment`, `service` |
40
- | [PostHog](https://posthog.com/) | Product analytics | `analytics`, `service` |
41
- | [Plausible](https://plausible.io/) | Simple web analytics | `analytics`, `service` |
42
- | [React Hook Form](https://react-hook-form.com/) | Form management (recommended) | `frontend`, `library`, `forms` |
43
- | [TanStack Form](https://tanstack.com/form) | Headless form management | `frontend`, `library`, `forms` |
44
- | [Uploadthing](https://uploadthing.com/) | Simple file uploads | `upload`, `images`, `service` |
45
- | [Cloudflare R2](https://developers.cloudflare.com/r2/) | S3-compatible storage | `backend`, `images`, `storage` |
46
- | [AWS S3](https://aws.amazon.com/s3/) | Object storage standard | `storage`, `images`, `infra` |
47
-
48
- ## Categories
49
-
50
- ### Framework & Frontend
51
- - **Next.js** - Main framework
52
- - **TanStack Query** - Data fetching & cache
53
- - **Zustand** - Client state management
54
- - **nuqs** - URL state
55
- - **shadcn/ui** - UI components
56
-
57
- ### Backend & API
58
- - **Next Safe Action** - Secure Server Actions
59
- - **next-zod-route** - Secure API Routes
60
- - **Better Auth** - Authentication
61
- - **AI SDK** - LLM integration
62
- - **up-fetch** - HTTP client
63
-
64
- ### Database & ORM
65
- - **Neon** - Serverless PostgreSQL (recommended)
66
- - **Supabase** - PostgreSQL + BaaS
67
- - **Prisma** - Type-safe ORM (recommended for teams)
68
- - **Drizzle ORM** - Lightweight ORM (recommended for performance)
69
-
70
- ### Realtime & Collaboration
71
- - **Convex** - Realtime database + backend (recommended for realtime apps)
72
- - **Liveblocks** - Multiplayer collaboration (cursors, presence, comments)
73
-
74
- ### Validation & Forms
75
- - **Zod** - Data validation (v4)
76
- - **React Hook Form** - Form management (recommended)
77
- - **TanStack Form** - Modern alternative
78
-
79
- ### Testing
80
- - **Vitest** - Unit tests
81
- - **Playwright** - E2E tests
82
-
83
- ### Monitoring & Analytics
84
- - **Sentry** - Error tracking & performance
85
- - **PostHog** - Product analytics (recommended)
86
- - **Plausible** - Simple web analytics
87
-
88
- ### Payments
89
- - **Stripe** - Complete solution (recommended for flexibility)
90
- - **Lemon Squeezy** - Simple + handles taxes (recommended for solopreneurs)
91
-
92
- ### Email
93
- - **Resend** - Transactional emails (recommended)
94
- - **React Email** - Email templates in React
95
- - **AWS SES** - High volume
96
-
97
- ### Images & Upload
98
- - **Uploadthing** - Simple Next.js uploads (recommended)
99
- - **Cloudflare R2** - Cheap object storage
100
- - **AWS S3** - Standard object storage
101
-
102
- ### Services & Infrastructure
103
- - **Inngest** - Async jobs & workflows
104
- - **Cloudflare Browser Rendering** - Serverless scraping
105
-
106
- ## Recommended Stack
107
-
108
- ### Frontend
109
- - Next.js + TanStack Query + Zustand + shadcn/ui
110
- - React Hook Form + Zod
111
-
112
- ### Backend
113
- - Neon (DB) + Prisma or Drizzle (ORM)
114
- - Next Safe Action + Better Auth
115
- - Resend + React Email
116
-
117
- ### Services
118
- - Stripe (payments)
119
- - Uploadthing (upload)
120
- - Cloudflare R2 (storage)
121
- - PostHog (analytics)
122
- - Sentry (monitoring)
123
-
124
- ### Testing
125
- - Vitest + Playwright
126
-
127
- ## Decision Guide
128
-
129
- | Decision | Recommendation |
130
- |----------|----------------|
131
- | Database | Neon + Prisma to start, Drizzle for performance |
132
- | Realtime | Convex for full realtime, Liveblocks for collaboration only |
133
- | Email | Resend to start, AWS SES for >100k/month |
134
- | Payments | Stripe for flexibility, Lemon Squeezy for tax simplicity |
135
- | Analytics | PostHog for product analytics, Plausible for simple web analytics |
136
- | Forms | React Hook Form (standard), TanStack Form (more control) |
137
- | ORM | Prisma (better DX), Drizzle (better perf, 2-3x faster) |
138
- | Upload | Uploadthing (simple), R2/S3 (more control) |
139
- | Testing | Vitest (unit), Playwright (E2E, more reliable than Cypress) |
140
-
141
- ## Important Notes
142
-
143
- - **Zod**: Now v4, specify version to AI
144
- - **Supabase Auth**: Prefer Better-Auth for flexibility
145
- - **Convex vs Neon+Liveblocks**: Convex if entire app is realtime, Neon+Liveblocks if only some features need collaboration
146
- - **AWS S3**: Watch egress costs, prefer R2 for serving assets
147
- - **Stripe Tax**: Enable for automatic tax handling
148
- - **Sentry**: Configure source maps for real stack traces
149
- - **Prisma vs Drizzle**: Prisma = better DX, Drizzle = better perf
@@ -1,211 +0,0 @@
1
- ---
2
- name: use-artifacts
3
- description: Create Claude-style local HTML artifacts under ~/.agents/artifacts. Use for plans, prototypes, visualizations, dashboards, diagrams, options, or substantial reusable content, with a portable local runtime and no Anthropic API.
4
- ---
5
-
6
- # Use Artifacts
7
-
8
- ## Overview
9
-
10
- Use this skill to simulate Claude Artifacts in agents that do not have a native artifact panel. The artifact is a small global workspace, usually a single self-contained HTML file, created at `~/.agents/artifacts/<id>/` so the user can open, inspect, and iterate on it from any repo.
11
-
12
- Always create artifacts in the global user directory: `~/.agents/artifacts/<id>/`. Never create artifacts inside a repo-local `.agents/artifacts` directory, even when the current working directory is a product repo.
13
-
14
- The HTML is the deliverable. It should turn the agent's public reasoning, plan, findings, examples, and tradeoffs into a polished page the user can scan, not just dump markdown into a file.
15
-
16
- Research basis: Claude artifacts are useful for substantial, self-contained content that the user may edit, reuse, view, or reference later. Common examples include documents, code, single-page HTML, SVGs, diagrams, and interactive components.
17
-
18
- ## Artifact Criteria
19
-
20
- Create an artifact when the work is:
21
-
22
- - substantial enough that inline chat would be hard to inspect or reuse
23
- - standalone without needing hidden conversation context
24
- - visual, interactive, document-like, or useful as a reusable reference
25
- - a feature plan, security review, product brief, implementation plan, or architecture explanation that benefits from visual structure
26
- - likely to need later iteration
27
-
28
- Do not create an artifact for a tiny answer, a short code snippet, or a change that belongs directly in an existing product codebase unless the user asks for a separate prototype.
29
-
30
- ## Artifact Modes
31
-
32
- Default to a thinking/showcase document when the request is about planning, explaining, reviewing, designing, or deciding. This is the Claude-style pattern in which an HTML page presents the answer as a readable artifact:
33
-
34
- - eyebrow with project/context
35
- - strong title and lede
36
- - high-signal finding or recommendation callout near the top
37
- - sections for model, tradeoffs, flows, edge cases, rollout, or implementation phases
38
- - code snippets, tables, pills, timelines, diagrams, or cards where they clarify the reasoning
39
- - final decisions, open questions, and validation notes
40
-
41
- For any plan artifact (`plan`, `feature-plan`, `implementation-plan`, product plan, launch plan, page plan, or strategy plan), always include both:
42
-
43
- - a draft of the page/content itself: proposed title, lede, sections, key copy, calls to action, states, or narrative blocks
44
- - croquis of the page: small visual sketches showing layout, hierarchy, content placement, and option differences
45
-
46
- The draft answers "what will this say/do?" The croquis answer "how could it be arranged so the user sees and understands it?"
47
-
48
- Use an interactive artifact when the user asks for a mini app, calculator, simulation, editor, dashboard, visualization, game, or prototype with controls.
49
-
50
- Use a variations/options artifact when the user asks for variations, options, directions, alternatives, explorations, or "show me a few versions". In this mode, do not build a real UI or final screen. Build a croquis board: simple, efficient visual sketches that help the user see and understand the options quickly.
51
-
52
- Variation croquis rules:
53
-
54
- - show 3-6 options on one page as a single vertical sequence: one direction per row, never a multi-column grid
55
- - give every direction the full available content width so its interface remains legible without opening it
56
- - start directly with the directions; do not add a masthead, hero, long lede, capability recap, or recommendation callout above them unless the user explicitly asks for that context
57
- - keep the page chrome minimal: a compact title or view switcher is enough, and omit it when the content is already self-explanatory
58
- - make each option visibly different in layout, hierarchy, rhythm, or concept
59
- - use wireframe-like boxes, simple labels, rough placeholders, arrows, swatches, and short notes
60
- - keep fidelity low-to-mid: enough to compare ideas, not enough to imply implementation is done
61
- - annotate the tradeoff under each croquis in one or two short lines
62
- - recommendations are optional, evidence-based, and shown only after all directions; never lead with generic "Best fit", ranking, or promotional copy
63
-
64
- Do not expose private chain-of-thought. Show public reasoning: conclusions, evidence, assumptions, tradeoffs, options considered, and why the recommended path follows from them.
65
-
66
- ## Design Fundamentals
67
-
68
- Approach every artifact as the design lead at a small studio known for versatility: each one gets a visual identity pitched at the treatment the task actually calls for, with deliberate palette, typography, and layout choices specific to the subject. Never ship a templated design. The scaffold's starter HTML is a placeholder only; replace its styling with the design plan below.
69
-
70
- ### Calibrate the treatment
71
-
72
- - Calibrate treatment, not whether to design. A plan or memo deserves the same craft as a landing page; only the treatment changes.
73
- - Utilitarian requests (plans, memos, reviews, dashboards, demos): polished but restrained. Real typographic hierarchy, considered spacing, a proper palette. No flashy gigantic hero; keep flourishes tasteful and limited.
74
- - Editorial requests (landing pages, games, apps or tools the user will keep or share): make opinionated calls and take one real aesthetic risk where it serves the work. Spend the boldness in one place and keep everything around it quiet.
75
- - When unsure: a well-composed page is never the wrong answer; an over-designed identity sometimes is.
76
-
77
- ### Design plan before code
78
-
79
- Sketch a compact token plan before writing any HTML, then derive every color and type decision from it:
80
-
81
- - Color: the palette as 4-6 named hex values.
82
- - Type: typefaces for 2+ roles (a characterful display face used with restraint, a complementary body face, a utility face for captions or data if needed).
83
- - Layout: the layout concept in one or two sentences.
84
-
85
- For editorial artifacts, review the plan against the subject before building: if any part reads like the generic default you would produce for any similar page, revise that part and record what changed and why in `HIGHLOGIC.md`.
86
-
87
- ### Fundamentals for every artifact
88
-
89
- - Honor what is already there. Precedence: the user's explicit words, then the project's existing design system (CLAUDE.md, tokens, theme files, components), then your own choices.
90
- - Ground it in the subject: one concrete subject, its audience, the page's single job. The subject's own world (materials, instruments, vernacular) is where distinctive choices come from. Build with real content, never lorem.
91
- - Typography carries the page. Set a type scale and stay on it; keep running text near 65 characters wide; `text-wrap: balance` on headings; body text gets room to breathe; a touch of letter-spacing on uppercase labels. Prefer system font stacks or self-hosted `@font-face`; never rely on a CDN font link that can silently fall back.
92
- - Choose neutrals, don't default to them: a pure mid-grey reads as unconsidered; a grey with a slight hue bias toward the accent reads as chosen. Pure white and near-black are fine grounds when picked, not inherited.
93
- - Let layout do the spacing: flex/grid with `gap`, not per-element margins that silently collapse or double. Wide content (tables, code, diagrams) scrolls inside its own `overflow-x: auto` container; the page body never scrolls sideways. Use `font-variant-numeric: tabular-nums` wherever digits line up.
94
- - Avoid the AI-generated look when nothing is specified: warm cream (#F4F1EA) with serif display and terracotta accent; near-black with a lone acid-green or vermilion pop; broadsheet hairline rules with dense columns; purple-to-blue gradient hero on white; Inter or Space Grotesk as the "safe" face; emoji as section markers; everything centered; `rounded-lg` everywhere; accent bars/rails on rounded cards. If the user explicitly asks for one of these looks, follow it exactly.
95
- - Build cleanly: watch overlapping elements, cascade collisions, and selector specificity fights (a `.section` rule cancelling a `.cta` rule over padding). Close every non-void element, double-quote attributes, give keyboard focus a visible state, respect `prefers-reduced-motion`. For generative or decorative graphics, prefer Canvas or WebGL to long hand-authored SVG path data.
96
- - Copy is design material: name things by what people recognize, not how the system is built; active voice; a control says exactly what happens ("Publish", then "Published"); errors explain what went wrong and how to fix it, no apologies, no vagueness.
97
- - Structure is information: numbering, eyebrows, dividers, and labels must encode something true about the content (a real sequence, a real hierarchy), never decoration. Question numbered markers (01/02/03) before using them.
98
- - When it's a UI, not a document: it is scanned and operated, not read top-to-bottom. Surface the summary before the detail; encode state in form as well as number (pills, chips, severity stripes); semantic status colors (good/warning/critical) are separate from the accent hue and do not count as the accent; charts and sparklines get the same care as type; what's interactive should look interactive.
99
- - Motion is deliberate: one orchestrated moment (page-load sequence, scroll reveal, hover micro-interaction) lands harder than scattered effects, and extra animation often reads as AI-generated. Sometimes less is more.
100
-
101
- ### Theme rules
102
-
103
- - **Inside an app, the artifact theme MUST match the app's theme.** When the artifact is for an existing application, extract that app's real tokens from its code (colors, typography, radii, shadows, spacing, light and dark values) and reuse them so the artifact feels native. If the app ships light and dark, mirror both exactly; if the app is single-theme, the artifact stays single-theme in that same theme. Never invent a parallel palette next to an existing one.
104
- - Otherwise, design both themes at token level: define the palette as custom properties on `:root`; redefine only the tokens under `@media (prefers-color-scheme: dark)`; redefine them again under `:root[data-theme="dark"]` and `:root[data-theme="light"]` so an explicit toggle beats the OS preference in both directions. Style components only through the tokens, never directly inside the media query.
105
- - Give the second theme the same care as the first: don't naively invert; keep contrast legible and the accent working on both grounds.
106
- - A design that deliberately commits to one visual world (a neon arcade screen, a letterpress invitation) may stay single-theme, recorded as a choice in `HIGHLOGIC.md`, never as an omission.
107
-
108
- ## Style Source
109
-
110
- Determine the visual direction in this order:
111
-
112
- 1. The user's explicit direction: follow it exactly, even when it differs from
113
- the application.
114
- 2. The existing application's actual visual language: when the artifact is for
115
- an existing app, inspect the relevant UI code, styles, design tokens,
116
- components, typography, spacing, colors, radii, shadows, and interaction
117
- patterns, then make the artifact feel native to the product. The theme must
118
- match the app's theme (see Theme rules above). Treat the application's
119
- current implementation as the source of truth; do not impose an unrelated
120
- look merely because the user gave no visual direction. Record the style in
121
- `HIGHLOGIC.md` and in `manifest.json` with a clear value such as
122
- `project:<app-name>`.
123
- 3. Otherwise, build a subject-specific identity per Design Fundamentals: design
124
- plan first, a chosen palette, a deliberate type pairing, restrained
125
- decoration, both themes at token level, and only the structure needed to
126
- communicate the artifact.
127
-
128
- State briefly whether the artifact uses the application style, a requested
129
- style, or a subject-specific identity.
130
-
131
- ## Runtime Capabilities (local, no Anthropic API)
132
-
133
- Published claude.ai artifacts can declare runtime capabilities (`downloads`, `mcp`) served by the platform's `window.claude` runtime. Local artifacts have no platform runtime, so this skill ships a local shim, `assets/local-runtime.js`, that provides the same call shapes with plain browser APIs only. Never call the Anthropic API, the claude.ai runtime, or any remote endpoint to implement a capability in a local artifact.
134
-
135
- Usage:
136
-
137
- 1. Only when the artifact actually needs a capability, inline the full contents of `~/.agents/skills/use-artifacts/assets/local-runtime.js` in a `<script>` tag at the top of `<body>`, before any feature code. The HTML stays self-contained; do not reference the file with `src`.
138
- 2. Write feature code against the standard surface: `window.claude.downloads.save(...)`, `window.claude.mcp.callTool/watchTool/listTools/invalidate`. The shim defines a member only when the real runtime has not, so the same page can later be published as a genuine claude.ai artifact without changing feature code.
139
- 3. Record the capabilities used in `manifest.json` (`"capabilities": ["downloads", "mcp"]`) and in `HIGHLOGIC.md`.
140
-
141
- Capabilities:
142
-
143
- - **downloads**: `window.claude.downloads.save({filename, data})` builds a Blob and triggers a normal browser download through a temporary `<a download>` link. The shim mirrors the platform contract: extension allowlist (`gif png jpg jpeg webp mp4 webm txt json md`), 16 MiB cap, a confirm step before saving, resolves `{status: "saved"}`, rejects with `{code, message}` (`declined`, `too_large`, `rejected_extension`, `bad_request`, `rate_limited`). Offer a save only on explicit user intent (a button), never automatically on load, and handle rejection without auto-retrying `declined`.
144
- - **mcp-style data**: there are no viewer connectors locally. Register local data sources with `window.claudeLocal.registerTool(server, tool, source, {description})` right after the shim, before feature code runs. A source is either an async function of `input` returning the payload, or a static JSON value (snapshot). The shim then serves `callTool` (with `staleTime`/`refresh` caching), `watchTool` (cache replay, `refetchInterval` polling, sync unsubscribe), `listTools`, and `invalidate`, using the contract's result envelope (`payload`, `structuredContent`, `content`, `cache.storedAt`) and error codes (`server_not_connected`, `tool_error`, `bad_request`).
145
-
146
- Capability rules:
147
-
148
- - Snapshots are static data: record the snapshot date and "static data" in `HIGHLOGIC.md`, and drive any "last updated" indicator in the UI from `result.cache.storedAt`, never from `Date.now()` at render time.
149
- - Branch degraded UX on the error `code`, never on message text. Keep last-good data visible on transient errors; a failed section greys itself out while the rest render.
150
- - Real data observed during the session may inform the payload shape, but never embed private values the user did not ask to include.
151
-
152
- ## Creation Workflow
153
-
154
- 1. Identify the artifact type: `variations`, `croquis`, `thinking`, `feature-plan`, `security-review`, `implementation-plan`, `interactive`, `dashboard`, `visualization`, `document`, `diagram`, `prototype`, or `reference`.
155
- 2. Determine the style source in this order: the user's explicit direction,
156
- the existing application's actual style and theme, then a subject-specific
157
- identity per Design Fundamentals.
158
- 3. Sketch the design plan (color, type, layout) per Design Fundamentals and
159
- record it in `HIGHLOGIC.md`.
160
- 4. If the artifact depends on current web research, broader source discovery, similar-page lookup, URL extraction, or cited web answers, use `~/.agents/skills/exa-search/SKILL.md`.
161
- 5. Scaffold the workspace:
162
-
163
- ```bash
164
- python3 ~/.agents/skills/use-artifacts/scripts/create_artifact.py "<short title>" --style "<requested, project:app-name, or subject-specific>" --kind thinking
165
- ```
166
-
167
- 6. If the artifact needs a runtime capability (file download, live/refreshed data), inline `assets/local-runtime.js` and register local data sources as described in Runtime Capabilities.
168
- 7. Implement the artifact in `index.html`, following the design plan and the theme rules.
169
- 8. Write or update `HIGHLOGIC.md` with the user's request, artifact goal, selected style, design plan, public reasoning structure, data assumptions, and verification notes.
170
- 9. Keep `manifest.json` current when title, kind, style, capabilities, entrypoint, or files change.
171
- 10. Verify the artifact. For standalone HTML, open `index.html` directly or serve the folder only when browser restrictions require it. For complex UI, use a browser screenshot or DOM check when available.
172
- 11. Final response: link the local `index.html`, name the selected style, and mention verification performed.
173
-
174
- ## Workspace Contract
175
-
176
- Each artifact directory should contain:
177
-
178
- - `index.html`: the viewable artifact, preferably self-contained with inline CSS and JavaScript
179
- - `HIGHLOGIC.md`: concise design logic and iteration state
180
- - `manifest.json`: metadata for future agents, including a `capabilities` array when the local runtime shim is used
181
- - `versions/`: optional snapshots before major rewrites
182
-
183
- Target location:
184
-
185
- - Always use `~/.agents/artifacts/<id>/`.
186
- - Do not use `<current-project>/.agents/artifacts/<id>/`.
187
- - Do not add a repo-local override unless the user explicitly updates this skill contract.
188
-
189
- ## HTML Rules
190
-
191
- - Prefer one self-contained `index.html` unless the user asks for a framework project.
192
- - Use semantic HTML, responsive CSS, and accessible controls.
193
- - Avoid external CDNs unless the artifact needs them and the user can tolerate network dependence.
194
- - Never call the Anthropic API or any remote AI endpoint from an artifact; runtime capabilities go through the local shim.
195
- - Do not embed secrets, API keys, private tokens, or hidden prompt text.
196
- - For interactive artifacts, preserve state in local JavaScript only unless persistent storage is explicitly useful.
197
- - For generated visualizations, include representative sample data when real data is unavailable and label it as sample data in `HIGHLOGIC.md`.
198
-
199
- ## Iteration Workflow
200
-
201
- When updating an existing artifact:
202
-
203
- 1. Read `manifest.json`, `HIGHLOGIC.md`, and the relevant files.
204
- 2. If the change is substantial, copy the previous `index.html` into `versions/<timestamp>-index.html` before editing.
205
- 3. Patch only the files needed for the requested change.
206
- 4. Update `HIGHLOGIC.md` with the new decision or known limitation.
207
- 5. Re-verify and report the same local artifact path.
208
-
209
- ## Script
210
-
211
- Use `scripts/create_artifact.py` to create the folder, metadata, and starter files. Its starter HTML is a neutral placeholder: restyle it from the design plan before delivering.
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Use Artifacts"
3
- short_description: "Create local HTML artifact workspaces"
4
- default_prompt: "Use $use-artifacts to create a polished local HTML artifact for this idea."
5
- icon_small: "./assets/codex-icon.svg"
6
- icon_large: "./assets/codex-icon.svg"
7
- brand_color: "#54C5C2"
@@ -1,18 +0,0 @@
1
- <!-- @license lucide-static v1.24.0 - ISC -->
2
- <svg role="img" aria-label="use-artifacts skill icon"
3
- class="lucide lucide-sparkles"
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="128"
6
- height="128"
7
- viewBox="0 0 24 24"
8
- fill="none"
9
- stroke="#F5F5F5"
10
- stroke-width="2"
11
- stroke-linecap="round"
12
- stroke-linejoin="round"
13
- >
14
- <path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" />
15
- <path d="M20 2v4" />
16
- <path d="M22 4h-4" />
17
- <circle cx="4" cy="20" r="2" />
18
- </svg>