# Enclave Skill Generator

> Auto-generates agent skill files for enclave sessions. Creates the enclave meta-skill (explains enclave constraints) and per-service skills (explains capabilities and constraints for each service). Use when working on agent awareness, skill injection, or harness configuration.

- Skill: `latchagent/enclave-skill-generator` (Agent Skill)
- Install (CLI): `npx skillmds@latest add latchagent/enclave-skill-generator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/latchagent/enclave-skill-generator/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: latchagent (https://skillmd.com/u/latchagent)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/latchagent/enclave-skill-generator

---


# Skill Generator

The SkillGenerator class lives at `src/main/services/skill-generator.ts` and produces markdown skill files that are injected into agent sessions.

## Two Types of Generated Skills

### 1. Enclave Meta-Skill
Generated by `generateEnclaveMeta(services)`. Injected into every enclave session. Tells the agent:
- It's running in a security enclave
- All traffic is monitored
- Credentials are automatic
- What services are available
- Rules (no bypass, no exfiltration, respect blocks)

### 2. Service Skills
Generated by `generateServiceSkill(service)`. One per registered service. Tells the agent:
- What capabilities it has (e.g., `gh pr create`, `aws s3 ls`)
- That auth is automatic — do NOT ask for tokens
- Service-specific constraints
- Not to modify auth config files

## Architecture Notes

- Skills are markdown strings — they get written to `.claude/skills/` or equivalent harness discovery paths
- SkillGenerator is stateless — it takes ServiceDefinition[] and returns strings
- The enclave manager or session startup code is responsible for writing these to disk
- Skills are regenerated each session (not cached) to reflect current service grants

## Testing

Tests: `src/main/services/skill-generator.test.ts`
Run: `npx vitest run src/main/services/skill-generator.test.ts`

