create-snipara 2.0.2 → 2.0.4

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 (3) hide show
  1. package/README.md +8 -0
  2. package/dist/index.js +340 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -171,6 +171,7 @@ The advanced flow asks for:
171
171
 
172
172
  The generated agent templates cover:
173
173
 
174
+ - Snipara skill pack under `.snipara/templates/skills/`
174
175
  - Codex `AGENTS.md`
175
176
  - Claude Code `CLAUDE.md`
176
177
  - Cursor `.cursor/rules/snipara.mdc`
@@ -179,6 +180,13 @@ The generated agent templates cover:
179
180
  - Mistral Le Chat connector, Vibe config, and LangChain `ChatMistralAI.bindTools` snippets
180
181
  - Gemini, VS Code, Continue, and custom HTTP MCP reference snippets
181
182
 
183
+ The generated skill pack includes portable, client-neutral skills for Snipara
184
+ onboarding, context workflow, safe parallel work, agent security, and proof
185
+ gates. Clients with native skill support can copy each folder from
186
+ `.snipara/templates/skills/` into the client's skill location. Clients without
187
+ native skills should keep using `AGENTS.md`, `CLAUDE.md`, or project rules as the
188
+ shared instruction surface.
189
+
182
190
  For Codex, `SNIPARA_API_KEY` is the only generated bearer token environment
183
191
  variable. If Codex lazily exposes only a minimal Snipara MCP surface after
184
192
  restart, force exact discovery for `snipara_recall`, `snipara_context_query`,
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { homedir } from "os";
13
13
  // package.json
14
14
  var package_default = {
15
15
  name: "create-snipara",
16
- version: "2.0.2",
16
+ version: "2.0.4",
17
17
  description: "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
18
18
  main: "dist/index.js",
19
19
  type: "module",
@@ -1285,6 +1285,11 @@ async function createClaudeCodeConfig(answers) {
1285
1285
  console.log(chalk.bold("\n\u{1F916} Claude Code MCP\n"));
1286
1286
  console.log(chalk.green(" \u2713 Project .mcp.json contains the Snipara Hosted MCP server"));
1287
1287
  console.log(chalk.dim(" Claude Code loads project-scoped MCP servers from .mcp.json."));
1288
+ console.log(
1289
+ chalk.dim(
1290
+ " Claude Code does not load project .env files for MCP; export SNIPARA_API_KEY before launching it."
1291
+ )
1292
+ );
1288
1293
  console.log(chalk.dim(` Verify with: claude mcp list && claude mcp test snipara`));
1289
1294
  }
1290
1295
  async function createProjectBinding(answers) {
@@ -1355,6 +1360,7 @@ async function createAgentTemplates(answers) {
1355
1360
  fs.writeFileSync(template.path, template.content);
1356
1361
  }
1357
1362
  console.log(chalk.green(" Created .snipara/templates agent snippets"));
1363
+ writeAgentSkillPackTemplates(path.join(templatesDir, "skills"), answers);
1358
1364
  writeIfMissing(
1359
1365
  path.join(process.cwd(), "AGENTS.md"),
1360
1366
  buildAgentsMdTemplate(answers),
@@ -1401,6 +1407,320 @@ function writeIfMissing(filePath, content, label) {
1401
1407
  function buildHostedMcpEndpoint(answers) {
1402
1408
  return `${API_URL}/mcp/${answers.projectSlug}`;
1403
1409
  }
1410
+ function writeAgentSkillPackTemplates(skillsDir, answers) {
1411
+ const skills = buildSniparaSkillPackTemplates(answers);
1412
+ for (const skill of skills) {
1413
+ const skillDir = path.join(skillsDir, skill.name);
1414
+ const agentsDir = path.join(skillDir, "agents");
1415
+ fs.mkdirSync(agentsDir, { recursive: true });
1416
+ fs.writeFileSync(path.join(skillDir, "SKILL.md"), skill.skillMd);
1417
+ fs.writeFileSync(path.join(agentsDir, "openai.yaml"), buildSkillOpenAiYaml(skill, answers));
1418
+ }
1419
+ console.log(chalk.green(" Created .snipara/templates/skills Snipara skill pack"));
1420
+ }
1421
+ function buildSkillOpenAiYaml(skill, answers) {
1422
+ return [
1423
+ "interface:",
1424
+ ` display_name: ${JSON.stringify(skill.displayName)}`,
1425
+ ` short_description: ${JSON.stringify(skill.shortDescription)}`,
1426
+ ` default_prompt: ${JSON.stringify(skill.defaultPrompt)}`,
1427
+ "",
1428
+ "dependencies:",
1429
+ " tools:",
1430
+ ' - type: "mcp"',
1431
+ ' value: "snipara"',
1432
+ ' description: "Snipara Hosted MCP"',
1433
+ ' transport: "streamable_http"',
1434
+ ` url: ${JSON.stringify(buildHostedMcpEndpoint(answers))}`,
1435
+ "",
1436
+ "policy:",
1437
+ " allow_implicit_invocation: true",
1438
+ ""
1439
+ ].join("\n");
1440
+ }
1441
+ function buildSniparaSkillPackTemplates(answers) {
1442
+ const endpoint = buildHostedMcpEndpoint(answers);
1443
+ const companionPrefix = answers.installCompanion ? "snipara-companion" : "npx -y snipara-companion@latest";
1444
+ return [
1445
+ {
1446
+ name: "snipara-onboarding",
1447
+ displayName: "Snipara Onboarding",
1448
+ shortDescription: "Connect agents to Snipara safely",
1449
+ defaultPrompt: "Use $snipara-onboarding to connect this project to Snipara Hosted MCP.",
1450
+ skillMd: buildSniparaOnboardingSkill(endpoint, companionPrefix)
1451
+ },
1452
+ {
1453
+ name: "snipara-context-workflow",
1454
+ displayName: "Snipara Context Workflow",
1455
+ shortDescription: "Use context, memory, and workflows",
1456
+ defaultPrompt: "Use $snipara-context-workflow to ground this task in Snipara context.",
1457
+ skillMd: buildSniparaContextWorkflowSkill(endpoint, companionPrefix)
1458
+ },
1459
+ {
1460
+ name: "snipara-safe-parallel-work",
1461
+ displayName: "Snipara Safe Parallel Work",
1462
+ shortDescription: "Coordinate agents without collisions",
1463
+ defaultPrompt: "Use $snipara-safe-parallel-work before editing shared files in parallel.",
1464
+ skillMd: buildSniparaSafeParallelWorkSkill(companionPrefix)
1465
+ },
1466
+ {
1467
+ name: "snipara-agent-security",
1468
+ displayName: "Snipara Agent Security",
1469
+ shortDescription: "Protect secrets, logs, and memory",
1470
+ defaultPrompt: "Use $snipara-agent-security to review this agent workflow for secret and auth risks.",
1471
+ skillMd: buildSniparaAgentSecuritySkill(endpoint, companionPrefix)
1472
+ },
1473
+ {
1474
+ name: "snipara-proof-gates",
1475
+ displayName: "Snipara Proof Gates",
1476
+ shortDescription: "Verify work before calling it done",
1477
+ defaultPrompt: "Use $snipara-proof-gates to define the proof needed before this task is done.",
1478
+ skillMd: buildSniparaProofGatesSkill(companionPrefix)
1479
+ }
1480
+ ];
1481
+ }
1482
+ function buildSniparaOnboardingSkill(endpoint, companionPrefix) {
1483
+ return [
1484
+ "---",
1485
+ "name: snipara-onboarding",
1486
+ 'description: "Set up Snipara Hosted MCP for an AI agent workspace, validate tool availability, configure API keys through environment variables, generate or merge agent instruction files, and run create-snipara or snipara-companion doctor checks. Use when onboarding a user, repository, assistant, or MCP-capable client to Snipara."',
1487
+ "---",
1488
+ "",
1489
+ "# Snipara Onboarding",
1490
+ "",
1491
+ "## Start Gate",
1492
+ "",
1493
+ `Use the Hosted MCP endpoint: \`${endpoint}\`. Keep the API key in \`SNIPARA_API_KEY\` or the client secret store. Never paste keys into tracked files, prompts, logs, screenshots, or durable memory.`,
1494
+ "",
1495
+ "Validate availability with a tool-oriented call such as `snipara_help(list_all=true)`, `snipara_settings`, or a lightweight `snipara_context_query`. Empty MCP resources or resource templates do not prove an outage because Snipara may be exposed as a tool-only MCP server.",
1496
+ "",
1497
+ "## Setup Steps",
1498
+ "",
1499
+ "1. Detect the target client: Codex, Claude Code, Cursor, VS Code, Continue, ChatGPT/OpenAI MCP, Claude Desktop, Mistral, Gemini, Orca-style MCP clients, or a generic HTTP MCP client.",
1500
+ "2. Prefer `npx create-snipara@latest` for initial setup. It generates Hosted MCP config, `AGENTS.md`, client-specific snippets, and the Snipara skill pack under `.snipara/templates/skills`.",
1501
+ "3. Merge generated instructions into existing files instead of replacing project-specific guidance.",
1502
+ `4. Run \`${companionPrefix} doctor\` when Companion is installed or available through npx.`,
1503
+ "5. Restart or reload the client after MCP configuration changes, then verify tool discovery again.",
1504
+ "",
1505
+ "## Client Notes",
1506
+ "",
1507
+ "- Codex: merge `.snipara/templates/codex-config.toml` into the user or project Codex config if the app does not load project config automatically.",
1508
+ "- Claude Code: keep `AGENTS.md` as the shared source and use `CLAUDE.md` as compatibility guidance.",
1509
+ "- Cursor: use `.cursor/rules/snipara.mdc` for always-applied project guidance.",
1510
+ "- Generic MCP clients: use the generated HTTP MCP reference and the shared `AGENTS.md` rules.",
1511
+ "- Clients with native skills: copy each folder under `.snipara/templates/skills` into the client's skill location.",
1512
+ "",
1513
+ "## Failure Handling",
1514
+ "",
1515
+ "If broad discovery shows only a partial tool surface, call `snipara_help(list_all=true)` before concluding a tool is unavailable. If the client still lags after config changes, use Companion commands as a local fallback for recall, query, and task commit until the MCP session refreshes.",
1516
+ ""
1517
+ ].join("\n");
1518
+ }
1519
+ function buildSniparaContextWorkflowSkill(endpoint, companionPrefix) {
1520
+ return [
1521
+ "---",
1522
+ "name: snipara-context-workflow",
1523
+ 'description: "Use Snipara Hosted MCP for project context, reviewed memory, source-grounded answers, code graph context, workflow mode selection, and durable task closeout. Use when an agent starts a task, resumes work, answers project-specific questions, edits code, or needs to distinguish source truth from memory."',
1524
+ "---",
1525
+ "",
1526
+ "# Snipara Context Workflow",
1527
+ "",
1528
+ "## Source Order",
1529
+ "",
1530
+ `Start from Hosted MCP at \`${endpoint}\`, then local files and tests for exact current state.`,
1531
+ "",
1532
+ "1. Validate Snipara tool availability with `snipara_help`, `snipara_settings`, or a lightweight context query.",
1533
+ "2. Use `snipara_recall` for durable decisions, preferences, validated learnings, and session carryover.",
1534
+ "3. Use `snipara_context_query` for documents, product truth, runbooks, architecture notes, source material, and answer packs.",
1535
+ "4. Use `snipara_get_chunk` before relying on precise wording from returned references.",
1536
+ "5. Use local `rg`, file reads, git commands, lint, type-checks, and tests for exact working-tree truth.",
1537
+ "",
1538
+ "## Workflow Modes",
1539
+ "",
1540
+ "- LITE: small known-file work with low risk.",
1541
+ "- STANDARD: normal project work that benefits from context and code graph follow-up.",
1542
+ "- FULL: multi-file, risky, release/deploy, auth, billing, schema, migration, architectural, or compaction-prone work.",
1543
+ "- Orchestrated FULL: work that needs htasks, production proof gates, routing, or parallel workers.",
1544
+ "",
1545
+ "Use Companion for managed workflow state when available:",
1546
+ "",
1547
+ "```bash",
1548
+ `${companionPrefix} workflow start --goal "<goal>" --plan-file <plan.json>`,
1549
+ `${companionPrefix} workflow phase-start <phase_id>`,
1550
+ `${companionPrefix} workflow phase-commit <phase_id> --summary "<outcome>" --files <files...>`,
1551
+ `${companionPrefix} workflow resume --include-session-context`,
1552
+ "```",
1553
+ "",
1554
+ "## Code Graph And Impact",
1555
+ "",
1556
+ "Use exposed `snipara_code_*` tools for structural questions such as callers, imports, neighbors, paths, symbol cards, and impact. When Companion is installed and the local worktree may be dirty or ahead, prefer Companion code commands because they can select a local overlay and report `sourceSelection`.",
1557
+ "",
1558
+ "Run impact before risky multi-file changes, PR reviews, route/service/job changes, auth, billing, deployment, schema, migrations, or explicit gap analysis.",
1559
+ "",
1560
+ "## Memory Closeout",
1561
+ "",
1562
+ "End substantial work with `snipara_end_of_task_commit` or a managed Companion phase/final commit. Store only durable decisions, learnings, preferences, todos, and reusable context. Never store secrets, raw logs, transient command output, or guesses.",
1563
+ ""
1564
+ ].join("\n");
1565
+ }
1566
+ function buildSniparaSafeParallelWorkSkill(companionPrefix) {
1567
+ return [
1568
+ "---",
1569
+ "name: snipara-safe-parallel-work",
1570
+ 'description: "Coordinate safe parallel work with Snipara Team Sync, collaboration sessions, claims, leases, guard checks, handoffs, and conflict outcomes. Use before editing shared files, taking over work, resuming a dirty workspace, committing, pushing, deploying, or running migrations in a team or multi-agent environment."',
1571
+ "---",
1572
+ "",
1573
+ "# Snipara Safe Parallel Work",
1574
+ "",
1575
+ "## Start Or Resume",
1576
+ "",
1577
+ "Before editing in a shared repository, check what changed and whether another human or agent owns the same surface.",
1578
+ "",
1579
+ "```bash",
1580
+ `${companionPrefix} workflow resume --include-session-context`,
1581
+ `${companionPrefix} team-sync what-changed`,
1582
+ `${companionPrefix} collaboration status`,
1583
+ "```",
1584
+ "",
1585
+ "For new work, leave a visible breadcrumb:",
1586
+ "",
1587
+ "```bash",
1588
+ `${companionPrefix} team-sync start-work --summary "<task>" --files <files...>`,
1589
+ "```",
1590
+ "",
1591
+ "## Guard Before Risk",
1592
+ "",
1593
+ "Run collaboration guards before large edits, commits, pushes, deploys, migrations, schema work, package releases, or work on files likely to be touched by others.",
1594
+ "",
1595
+ "```bash",
1596
+ `${companionPrefix} collaboration guard --files <files...>`,
1597
+ `${companionPrefix} collaboration guard --profile pre-commit --enforce`,
1598
+ `${companionPrefix} collaboration guard --profile pre-push --enforce`,
1599
+ `${companionPrefix} collaboration guard --profile pre-deploy --enforce`,
1600
+ "```",
1601
+ "",
1602
+ "Treat outcomes as follows:",
1603
+ "",
1604
+ "- `CLEAR`: proceed.",
1605
+ "- `WATCH`: proceed, but leave a handoff and watch the surface.",
1606
+ "- `REQUIRES_ACK` or `REVIEW_REQUIRED`: coordinate explicitly before proceeding.",
1607
+ "- `BLOCKED`: stop until the conflict, lease, or ownership issue is resolved.",
1608
+ "",
1609
+ "## Claims And Leases",
1610
+ "",
1611
+ "Use exclusive claims only for genuinely risky surfaces such as schema, migrations, deployment scripts, auth, billing, package publication, or production data handling. Release claims when work finishes or becomes blocked.",
1612
+ "",
1613
+ "## Handoff",
1614
+ "",
1615
+ "End multi-agent work with a concise handoff:",
1616
+ "",
1617
+ "```bash",
1618
+ `${companionPrefix} team-sync handoff --summary "<changed>" --next "<recommended next action>" --files <files...> --attention watch`,
1619
+ "```",
1620
+ "",
1621
+ "Do not treat stale local warnings as final truth. Verify hosted active sessions and leases before blocking useful work.",
1622
+ ""
1623
+ ].join("\n");
1624
+ }
1625
+ function buildSniparaAgentSecuritySkill(endpoint, companionPrefix) {
1626
+ return [
1627
+ "---",
1628
+ "name: snipara-agent-security",
1629
+ 'description: "Apply security guardrails to Snipara-enabled agent workflows, including API key handling, secret storage, memory hygiene, logging, webhook/OAuth callback review, URL handling, and fail-open versus fail-closed decisions. Use for onboarding, automation, reviews, and any task that touches credentials or sensitive project data."',
1630
+ "---",
1631
+ "",
1632
+ "# Snipara Agent Security",
1633
+ "",
1634
+ "## Trust Boundary",
1635
+ "",
1636
+ `Hosted MCP endpoint: \`${endpoint}\`. The API key belongs in environment variables or the client secret store, not in tracked files.`,
1637
+ "",
1638
+ "Before changing an agent workflow, identify:",
1639
+ "",
1640
+ "- caller identity and auth mode",
1641
+ "- project or team ownership boundary",
1642
+ "- input source and whether it is user-controlled",
1643
+ "- side effects such as writes, webhooks, deploys, memory writes, or package publication",
1644
+ "- logs, telemetry, returned errors, and persisted artifacts",
1645
+ "",
1646
+ "## Secrets",
1647
+ "",
1648
+ "- Never commit API keys, OAuth tokens, private keys, database URLs, cookies, raw headers, or session secrets.",
1649
+ "- Never store secrets in Snipara memory, handoff summaries, task commits, answer captures, or examples.",
1650
+ "- Use `.env`, `.env.local`, OS keychains, launch agents, CI secrets, or MCP client secret fields.",
1651
+ "- If a secret was committed or pasted into a durable artifact, treat it as compromised and rotate it.",
1652
+ "",
1653
+ "## Memory And Logs",
1654
+ "",
1655
+ "Persist durable reasoning, not sensitive payloads. Store decisions, workflows, and validated learnings. Do not store raw logs, transient command output, customer data dumps, credentials, or unreviewed guesses.",
1656
+ "",
1657
+ "Sanitize logs before sharing them with agents. Keep identifiers bounded and avoid raw request bodies unless the user explicitly approves and the data is safe.",
1658
+ "",
1659
+ "## Agent Automation",
1660
+ "",
1661
+ "For agent hooks, collaboration guards, and deploy gates, preserve the intended fail-open or fail-closed behavior. Security-critical writes should fail closed; developer-assist hints may fail open with a visible warning.",
1662
+ "",
1663
+ "Use Companion checks when available:",
1664
+ "",
1665
+ "```bash",
1666
+ `${companionPrefix} doctor`,
1667
+ `${companionPrefix} collaboration guard --profile pre-commit --enforce`,
1668
+ `${companionPrefix} stuck-guard status`,
1669
+ "```",
1670
+ "",
1671
+ "## Review Hotspots",
1672
+ "",
1673
+ "Review OAuth/device flows, GitHub App callbacks, webhooks, internal API secrets, generated MCP configs, URL path encoding, JSON embedded into script contexts, CORS/CSP changes, rate limits, and package hooks.",
1674
+ "",
1675
+ "State the threat reduced, files or configuration changed, tests run, and any deferred security work. Do not imply broad security coverage from a narrow patch.",
1676
+ ""
1677
+ ].join("\n");
1678
+ }
1679
+ function buildSniparaProofGatesSkill(companionPrefix) {
1680
+ return [
1681
+ "---",
1682
+ "name: snipara-proof-gates",
1683
+ 'description: "Define and run proof gates before an agent calls Snipara-enabled work done, including local tests, lint/type-checks, code impact, package surface checks, deploy smoke tests, registry verification, and task commit evidence. Use for releases, package updates, production changes, risky edits, and user-visible workflow changes."',
1684
+ "---",
1685
+ "",
1686
+ "# Snipara Proof Gates",
1687
+ "",
1688
+ "## Done Means Proven",
1689
+ "",
1690
+ "Do not call work complete just because code was edited. Match proof to blast radius and report gaps honestly.",
1691
+ "",
1692
+ "## Common Gates",
1693
+ "",
1694
+ "- Small code change: focused unit test, lint/type-check for touched package, and local behavior check.",
1695
+ "- Route/service/job/auth/billing/schema/deploy change: code impact, focused tests, type-check, and environment-specific smoke.",
1696
+ "- Package change: package tests, build, pack dry-run or pack smoke, registry comparison if publishing, and `npx` or clean install verification after publish.",
1697
+ "- Production deploy: health checks, route-specific probes, live version marker when available, and log scan for the changed behavior.",
1698
+ "- Documentation/template change: generated artifact inspection plus the smallest test proving the generator still emits the expected files.",
1699
+ "",
1700
+ "## Snipara-Specific Gates",
1701
+ "",
1702
+ "Use context and impact before risky conclusions:",
1703
+ "",
1704
+ "```bash",
1705
+ `${companionPrefix} brief --task "<task>" --changed-files <files...> --diff-summary "<summary>"`,
1706
+ `${companionPrefix} code impact --changed-files <files...> --diff-summary "<summary>"`,
1707
+ "```",
1708
+ "",
1709
+ "Use managed workflow commits for durable proof:",
1710
+ "",
1711
+ "```bash",
1712
+ `${companionPrefix} workflow phase-commit <phase_id> --summary "<outcome>" --files <files...>`,
1713
+ `${companionPrefix} final-commit --summary "<final outcome>" --files <files...>`,
1714
+ "```",
1715
+ "",
1716
+ "If Companion is unavailable, use hosted `snipara_code_impact` when exposed and `snipara_end_of_task_commit` for durable closeout.",
1717
+ "",
1718
+ "## Reporting",
1719
+ "",
1720
+ "Report commands run, files changed, published or deployed versions, smoke results, and anything not verified. Keep package-release status separate from app-deploy status.",
1721
+ ""
1722
+ ].join("\n");
1723
+ }
1404
1724
  function buildAgentsMdTemplate(answers) {
1405
1725
  return `# AGENTS.md
1406
1726
 
@@ -1427,6 +1747,9 @@ This project uses Snipara Hosted MCP for project context and reviewed memory.
1427
1747
  \`snipara-companion recall\`, \`snipara-companion query\`, and
1428
1748
  \`snipara-companion task-commit\` as the reliable local fallback, then restart
1429
1749
  or reload Codex after MCP config changes.
1750
+ - If the client supports native skills, install the generated Snipara skill pack
1751
+ from \`.snipara/templates/skills\`. Keep this \`AGENTS.md\` file as the shared
1752
+ fallback for clients without native skill support.
1430
1753
 
1431
1754
  ${EXPERIENCE_GOAL_SECTION}
1432
1755
 
@@ -1497,6 +1820,7 @@ Use Snipara Hosted MCP before answering project-specific questions.
1497
1820
  - Auth: use \`SNIPARA_API_KEY\` from the environment. Never commit keys.
1498
1821
  - At the start of every new thread, validate hosted MCP with a tool-oriented call such as \`snipara_settings\`, \`tools/list\`, or a lightweight \`snipara_context_query\`. Do not treat empty MCP resources/templates as an outage because Snipara may be tool-only.
1499
1822
  - If a session exposes only a subset of expected Snipara tools, call \`snipara_help(list_all=true)\` and compare exact tool names before concluding a tool is unavailable. If only a partial surface remains after exact discovery, use \`snipara-companion recall\`, \`snipara-companion query\`, and \`snipara-companion task-commit\` as a reliable local fallback.
1823
+ - If the client supports native skills, install the generated Snipara skill pack from \`.snipara/templates/skills\`. Keep \`AGENTS.md\` as the shared fallback for clients without native skill support.
1500
1824
 
1501
1825
  ${EXPERIENCE_GOAL_SECTION}
1502
1826
 
@@ -1536,6 +1860,7 @@ This workspace uses Snipara Hosted MCP for current project context, business/cli
1536
1860
  - Endpoint: \`${buildHostedMcpEndpoint(answers)}\`
1537
1861
  - At the start of every new thread, validate hosted MCP with a tool-oriented call such as \`snipara_settings\`, \`tools/list\`, or a lightweight \`snipara_context_query\`. Do not treat empty MCP resources/templates as an outage because Snipara may be tool-only.
1538
1862
  - If a session exposes only a subset of expected Snipara tools, call \`snipara_help(list_all=true)\` and compare exact tool names before concluding a tool is unavailable. If only a partial surface remains after exact discovery, use \`snipara-companion recall\`, \`snipara-companion query\`, and \`snipara-companion task-commit\` as a reliable local fallback.
1863
+ - If the client supports native skills, install the generated Snipara skill pack from \`.snipara/templates/skills\`. Keep \`AGENTS.md\` as the shared fallback for clients without native skill support.
1539
1864
 
1540
1865
  ${EXPERIENCE_GOAL_SECTION}
1541
1866
 
@@ -2751,6 +3076,8 @@ function getClaudeClientChecks(answers, detection) {
2751
3076
  detail: projectHasSnipara ? "Project .mcp.json contains a Snipara Hosted MCP server" : "Project .mcp.json does not contain a Snipara Hosted MCP server"
2752
3077
  });
2753
3078
  if (answers.aiClient === "claude-code") {
3079
+ const envFileApiKey = readApiKeyFromEnvFiles();
3080
+ const processHasApiKey = Boolean(process.env.SNIPARA_API_KEY?.trim());
2754
3081
  checks.push({
2755
3082
  name: "claude_code_settings",
2756
3083
  status: hasLegacyCodeSettingsMcp ? "warn" : "pass",
@@ -2758,6 +3085,11 @@ function getClaudeClientChecks(answers, detection) {
2758
3085
  ", "
2759
3086
  )}); Claude Code project MCP should live in .mcp.json or be managed by claude mcp add --scope project` : "Claude settings are not being used as the MCP destination; .claude/settings.json is hooks-only"
2760
3087
  });
3088
+ checks.push({
3089
+ name: "claude_env_key_visible",
3090
+ status: processHasApiKey ? "pass" : "warn",
3091
+ detail: processHasApiKey ? "SNIPARA_API_KEY is visible in the current process environment used for MCP diagnostics" : envFileApiKey ? "SNIPARA_API_KEY exists in .env/.env.local, but Claude Code does not load project .env files for MCP servers. Export it in the shell or launch environment before starting Claude Code, then run: claude mcp list && claude mcp test snipara" : "SNIPARA_API_KEY is not visible to this process. Export it in the shell or launch environment before starting Claude Code, then run: claude mcp list && claude mcp test snipara"
3092
+ });
2761
3093
  checks.push({
2762
3094
  name: "claude_code_hooks",
2763
3095
  status: !answers.installHooks || projectHooksConfigured ? "pass" : "warn",
@@ -2929,6 +3261,11 @@ async function runValidation(answers, includeHostedCheck, options = {}) {
2929
3261
  status: detection.files.sniparaTemplates && detection.files.cursorRule && detection.files.codexConfig ? "pass" : "warn",
2930
3262
  detail: detection.files.sniparaTemplates && detection.files.cursorRule && detection.files.codexConfig ? ".snipara/templates, .cursor/rules/snipara.mdc, and .codex/config.toml present" : "Agent templates, Cursor rule, or Codex config missing"
2931
3263
  });
3264
+ checks.push({
3265
+ name: "snipara_skill_pack",
3266
+ status: detection.files.sniparaSkillPack ? "pass" : "warn",
3267
+ detail: detection.files.sniparaSkillPack ? ".snipara/templates/skills contains the Snipara skill pack" : "Snipara skill pack missing from .snipara/templates/skills"
3268
+ });
2932
3269
  if (targetClient === "codex") {
2933
3270
  checks.push(getCodexConfigCheck());
2934
3271
  }
@@ -3490,7 +3827,8 @@ function detectEnvironment() {
3490
3827
  cursorDir: fs.existsSync(path.join(homedir(), ".cursor")),
3491
3828
  mistralVibeConfig: fs.existsSync(path.join(process.cwd(), ".vibe", "config.toml")) || fs.existsSync(path.join(homedir(), ".vibe", "config.toml")),
3492
3829
  sniparaCompanionPack: fs.existsSync(path.join(process.cwd(), ".snipara", "companion")),
3493
- sniparaTemplates: fs.existsSync(path.join(process.cwd(), ".snipara", "templates"))
3830
+ sniparaTemplates: fs.existsSync(path.join(process.cwd(), ".snipara", "templates")),
3831
+ sniparaSkillPack: fs.existsSync(path.join(process.cwd(), ".snipara", "templates", "skills"))
3494
3832
  },
3495
3833
  tooling: {
3496
3834
  node: commandExists("node"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-snipara",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",