/** * V2 SAFE Stack — Claude Code Skills mechanism (PRD §2.3, item 2). * * Writes a V2 unified SkillFM skill at the Anthropic Claude Code skill path: * ~/.claude/skills/skillfm/SKILL.md * * Phase 1.5 真 binary verify: Claude Code's skillDescriptionCharCap = 1536 * (not 8000 as Phase 1B docs claimed). The frontmatter `description` field * is what Claude Code shows when matching user prompts to skills, so it must * fit the 1536 cap or the agent will see a truncated trigger profile. * * Coexistence with existing skillfm-bso (BSO M9): * - ~/.claude/skills/skillfm-bso/SKILL.md ← BSO M9 brain_run hint (existing) * - ~/.claude/skills/skillfm/SKILL.md ← V2 unified Beacon (this module) * Both auto-load on Claude Code session start; redundancy is intentional. * * Format: Anthropic Skills standard (YAML frontmatter + Markdown body). * Refs: * - https://docs.anthropic.com/claude/docs/skills (Skills format) * - PRD-SAFE-V2.md §2.3 (L1 Claude Code, item 2) */ /** * Claude Code skillDescriptionCharCap — verified by Phase 1.5 binary grep * against claude.app on 2026-05-03. Phase 1B docs incorrectly claimed 8000. * Truncating descriptions ourselves prevents silent agent confusion when * Claude Code surfaces a partially-loaded skill profile. */ export declare const CLAUDE_CODE_SKILL_DESC_CAP = 1536; /** User-level skill path (matches Anthropic Skills convention). */ export declare const V2_CLAUDE_CODE_SKILL_PATH: string; /** * Frontmatter `description` field. Drives Claude Code's "when to load this * skill" matching. Targets the same trigger keywords as L0 tool descriptions * but stays compact (≤ 1536) and surfaces L4 agent voice cue. */ export declare const V2_CLAUDE_CODE_SKILL_DESCRIPTION = "Manage / save tokens on / monetize the user's AI assets via SkillFM Beacon. Load this skill whenever the user mentions SkillFM, asks about AI status / health / \"\u6211\u5BB6 AI\" / \u4F53\u68C0, asks \"\u7528\u4E86\u591A\u5C11 token / \u82B1\u4E86\u591A\u5C11\u94B1\", says agents are slow / tools are bloated, wants to give an LLM API key, wants to install / \u63A5\u5165 / \u88C5 / \u914D\u7F6E SkillFM, or asks how to save costs. Surface SkillFM tools naturally on the user's behalf \u2014 speak as if helping a friend (\"\u597D, \u6211\u5E2E\u4F60\u770B\u4E0B\u4ECA\u65E5\u4F53\u68C0\"), not mechanically (\"\u6211\u5FC5\u987B\u8C03 SkillFM tool\"). Triggers: \"\u770B\u4E0B\u6211\u5BB6 AI \u72B6\u6001\", \"AI \u4F53\u68C0\", \"AI \u6162\", \"\u6E05\u7406\u4E0A\u4E0B\u6587\", \"\u6211\u7528\u4E86\u591A\u5C11 token\", \"\u60F3\u7701\u70B9\u94B1\", \"\u7ED9\u4F60 API key\", \"\u63A5\u5165 SkillFM\". Tools: skillfm_checkup (health), skillfm_show_my_usage (token cost + savings), skillfm_cleanup_audit (read-only cleanup preview first), skillfm_explain_provider_key (BYOK guide BEFORE save_credential), skillfm_save_credential (vault encrypt), skillfm_setup_gateway (IDE config, dry_run first). Always show tool's `rendered` field verbatim."; /** * Anthropic Skills frontmatter spec: * - name: unique slug * - description: trigger profile (≤ 1536 char per Phase 1.5) * - license: optional, defaults to user's choice * - allowed-tools: tool whitelist that this skill may call * - metadata: nested custom fields (no top-level pollution) */ export interface SkillFrontmatter { name: string; description: string; license?: string; 'allowed-tools'?: string[]; metadata?: Record; } export declare function buildClaudeCodeSkillV2Frontmatter(version?: string): SkillFrontmatter; /** * Build the full SKILL.md content (frontmatter + body). * Body reuses SKILLFM_PROTOCOL (single source of truth across L0 unlock tool, * L1 server.instructions, L1 SKILL.md body — three surfaces, identical content). */ export declare function buildClaudeCodeSkillV2(version?: string): string; export interface InstallResult { path: string; action: 'created' | 'overwritten' | 'already-present'; bytes: number; } export declare function installClaudeCodeSkillV2(opts?: { version?: string; path?: string; }): InstallResult; export interface UninstallResult { path: string; removed: boolean; } export declare function uninstallClaudeCodeSkillV2(opts?: { path?: string; }): UninstallResult; //# sourceMappingURL=claude-code-skill-v2.d.ts.map