kyoten

skill
Guvenlik Denetimi
Basarisiz
Health Gecti
  • License — License: ISC
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 10 GitHub stars
Code Basarisiz
  • fs.rmSync — Destructive file system operation in .claude/hooks/__tests__/audit_logger.test.js
  • fs.rmSync — Destructive file system operation in .claude/hooks/__tests__/auto_format.test.js
  • fs.rmSync — Destructive file system operation in .claude/hooks/__tests__/context_monitor.test.js
  • rm -rf — Recursive force deletion command in .claude/hooks/__tests__/guard.test.js
  • fs.rmSync — Destructive file system operation in .claude/hooks/__tests__/guard.test.js
  • fs.rmSync — Destructive file system operation in .claude/hooks/__tests__/pre_compact.test.js
  • fs.rmSync — Destructive file system operation in .claude/hooks/__tests__/session_start.test.js
  • fs.rmSync — Destructive file system operation in .claude/hooks/__tests__/task_loop.test.js
  • process.env — Environment variable access in .claude/hooks/audit_logger.js
  • process.env — Environment variable access in .claude/hooks/auto_format.js
  • process.env — Environment variable access in .claude/hooks/context_monitor.js
  • os.homedir — User home directory access in .claude/hooks/guard.js
  • process.env — Environment variable access in .claude/hooks/guard.js
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Your personal home base for AI coding agents — one shared workspace for programming, documentation, research, translation, and generative-AI work.

README.md

Kyoten

Kyoten

Your personal home base for AI coding agents — one shared workspace for programming, documentation, research, translation, and generative-AI work. ✨

Test CI
License: ISC

🌐 English · 日本語 · 繁體中文


Kyoten (拠点, Japanese for "home base" or "operations hub") brings all of your AI-agent setup into one clean, portable repository. Instead of repeating rules, hooks, skills, and memory across every tool, you configure your home base once and work seamlessly with Claude Code, Codex, Antigravity CLI (agy), and DeepSeek Harness (dsh).

Everything runs on plain Node.js ESM with zero runtime dependencies, no monorepo, and no build step — just clone, run setup once, and launch your preferred coding agent inside the workspace. 🌿

✨ Why Kyoten?

  • 🤝 One Home Base, Four Harnesses — Canonical instructions (AGENTS.md), shared hooks (utils/harness/hooks.js), and synced role prompts across Claude Code, Codex, Antigravity CLI (agy), and DeepSeek Harness (dsh), kept in sync with pnpm harness sync.
  • 📝 Task Continuity & Clean-Context Reviews (pnpm task) — Per-session active task tracking (plan.md, state.json, NOTES.md), step dependencies, verification gates, and an independent 2-round review + triage loop.
  • 🧠 Local Personal Memory & Personalization (pnpm memory) — Machine-local, git-ignored memory with core-block injection, prompt/failure recall, multi-agent background extraction and consolidation, and customizable agent voice (pnpm memory personalize).
  • 🚀 Multi-Agent Orchestration (pnpm agent, pnpm loop, pnpm swarm) — Ask another agent for a headless second opinion, run unattended fix-and-review loops in a git worktree, or parallelize ready steps across worktrees with a clean context.
  • 🧩 Modular Skills Ecosystem (skills-lock.json) — Tracked workspace skills plus pinned external skills (including portable skills from shino369/kyoten-skills), managed cleanly with pnpm skills:install, pnpm skills:check, and pnpm skills:link.
  • 🛡️ Built-in Guardrails & Quality Gate (pnpm check) — Secret protection, undoable deletion (pnpm task rm), supply-chain hardening, cross-harness git hooks, TypeScript typechecking, ESLint, Prettier, and Vitest with a 95% coverage floor.

📖 Looking for every command and flag? Check the generated CLI Reference and the full architecture walkthrough in docs/harness.md.

📋 Requirements

  • Node.js 24 or later (.nvmrc pins 24; agent-browser requires 24+)
  • pnpm 12.14.0, pinned in package.json via Corepack — run corepack enable, or prefix commands with corepack pnpm
  • Chrome / Chromium (optional) — for Playwright e2e tests and browser-driving skills
  • uv (optional) — for the browser-use runtime and Python 3.12 skill scripts (skill-creator, transparent-background)
  • gh CLI (optional) — for GitHub workflows and PR reviews

🚀 Getting Started

git clone https://github.com/shino369/kyoten.git
cd kyoten
corepack enable
pnpm workspace:setup   # install deps + pinned skills, link skills, enable git hooks, init memory
pnpm workspace:check   # verify setup; every failure prints a Fix command

Optional setup flags:

  • --with-browsers — install agent-browser and Playwright Chromium
  • --skip-skills — skip external skill downloads when offline
  • --target <dir> — link skills into another harness's skill folder

See .agents/skills/workspace-setup/SKILL.md for troubleshooting.

Run the full quality gate for typechecking, linting, format checks, and tests with coverage.

pnpm check

Then simply start your coding agent (Claude Code, Codex, agy, or DSH) inside this directory! 🎉

🗂️ Repository Layout

.
├── .agents/
│   ├── agents/              # Generated Antigravity role prompts (pnpm harness sync)
│   ├── hooks.json           # Generated Antigravity hooks config
│   └── skills/              # Skills: project-owned (tracked) + external (git-ignored)
├── .claude/
│   ├── agents/              # Canonical role prompts / subagents
│   ├── hooks/               # Hook entry points (task brief, context monitor, audit, format)
│   ├── rules/               # Path-scoped rules (scripts, tests)
│   ├── skills/              # Links into .agents/skills (generated, git-ignored)
│   └── workflows/           # Saved Claude Code workflows (review, implement-plan, research)
├── .codex/                  # Generated Codex hooks, rules, and role prompts
├── .dsh/                    # Generated DSH hooks and workspace patch overlay
├── .githooks/               # pre-commit + commit-msg (all harnesses)
├── docs/
│   ├── cli.md               # Generated CLI reference (pnpm docs:cli)
│   ├── harness.md           # Full harness architecture & worked examples
│   └── testing/             # Deep testing & mocking guides
├── e2e/                     # Playwright e2e tests
├── tasks/                   # Machine-local task folders (git-ignored)
├── templates/task/          # plan / NOTES / REVIEW / STUDIES templates for pnpm task
├── tools/                   # catalog.json (tracked) + local.json (this machine, git-ignored)
├── utils/                   # Shared Node ESM utilities (task, memory, harness, loop, swarm, agent, tools)
├── AGENTS.md                # Canonical instructions for every agent harness
├── CLAUDE.md                # @AGENTS.md + Claude-Code-only notes
├── skills-lock.json         # Pinned external skills lockfile (skills.sh)
└── ...

External skills are not committed to git. pnpm skills:install installs the recommended set from skills-lock.json into .agents/skills/ (git-ignored), so you stay in control of what lands on your machine.

🤖 Supported Harnesses & Orchestration

Harness Instructions Skills & Integration
Claude Code CLAUDE.md → @AGENTS.md .claude/skills/ links, .claude/settings.json, hooks, subagents
Codex AGENTS.md .agents/skills/ (native), .codex/hooks.json, .codex/rules/, .codex/agents/
Antigravity CLI (agy) AGENTS.md (≤ 24,000 bytes) .agents/skills/ (native), .agents/hooks.json (6 events), .agents/agents/
DeepSeek Harness (dsh) AGENTS.md (start with --patch .dsh/workspace.patch.yml) .agents/skills/, .dsh/hooks.json, Claude hooks bridge (partly tested)

Run pnpm harness sync to regenerate harness configs from the canonical sources and pnpm harness check to verify they match. The git hooks in .githooks/ enforce formatting, linting, and Conventional Commits for every harness, and pnpm task status prints the same resume brief that SessionStart injects.

🛠️ Tools & Calling Other Agents

pnpm tools scan detects agents, CLIs, and runtimes installed on this machine and saves them to tools/local.json (git-ignored) against tools/catalog.json. SessionStart includes a one-line tool summary so every agent knows what it can delegate to.

pnpm tools list --all                                   # see installed tools and install hints
pnpm tools add dsh --kind agent --command "npx -y @deepseek-ai/dsh"
pnpm agent ask --agent codex "Review utils/task/loop.js for edge cases"   # read-only second opinion
pnpm loop my-task --agent codex --max 3                 # unattended fix-until-green in a worktree
pnpm loop my-task --agent codex --review --reviewer claude   # + independent review rounds & fixes
pnpm swarm my-task --agent claude --workers 2           # parallel workers, one worktree per step

Every headless child runs with MEMORY_EXTRACT=1 (keeping memory hooks silent and sessions out of the extraction queue), and pnpm loop / pnpm swarm worktrees omit AGENTS.local.md and CLAUDE.local.md so reviews and fixes always start with a clean context.

📝 Tasks & Review Loop

Generated work lives in tasks/<task-name-yymmdd>/, managed via pnpm task so any agent — or you — can pause, hand off, and resume without losing the thread:

pnpm task new some-task --goal "Translate the X post" --step "Draft" --step "Proofread" --verify "pnpm check"
pnpm task step s1 start            # … work …
pnpm task step s1 done -m "draft in translated/"
pnpm task note --done "drafted" --next "proofread section 2"
pnpm task status                   # resume brief: goal, next step, last note, verify, git
tasks/some-task-260101/
├── plan.md                        # goal, acceptance, generated steps, decisions
├── state.json                     # machine state (managed only via pnpm task)
├── NOTES.md                       # append-only progress log
├── reviews/REVIEW_some-task.md    # pnpm task template review
├── studies/STUDIES_some-task.md   # pnpm task template study
└── scripts/ docs/ translated/ tmp/

Each session binds its own active task (with tasks/.active as the default for new sessions). SessionStart injects the resume brief automatically across supported harnesses, and code tasks follow a structured quality loop: plan → test-first build → clean-context review (pnpm task review) → independent triage → fix (up to 2 rounds). Full details live in AGENTS.md §4 and docs/harness.md. tasks/ and logs/ are git-ignored — tasks stay personal to each machine.

🧠 Local Personal Memory & Personalization

Agents remember lasting preferences, machine workarounds, and repo facts across sessions and harnesses — strictly on your machine (memory/, AGENTS.local.md, and CLAUDE.local.md are git-ignored; nothing is ever pushed):

pnpm memory init                    # once (pnpm workspace:setup runs it)
pnpm memory                         # status: notes, core block, saving on/off, extraction queue
pnpm memory add "The user prefers design first, then review." --scope user --type preference --tags design,review
pnpm memory recall "how do I merge this PR"   # preview what the hooks would inject
pnpm memory personalize --presets   # set how agents talk to you (chat only, never code/commits)
pnpm memory personalize --language "Japanese"   # keep your reply language even when writing in English
pnpm memory personalize --persona-file persona.md   # load a longer markdown persona
# or edit memory/persona.md directly: pnpm memory init (and workspace:setup) apply your edits
pnpm memory personalize --off       # pause saved response personalization
pnpm memory personalize --on        # resume in new sessions
pnpm memory off --session           # incognito session (no saving)
pnpm memory export                  # checksummed .tar.gz backup; restore via import <file> --dry-run
  • Multi-agent background jobs: Extraction, weekly consolidation, and persona compact/audit run on the session's own agent CLI (claude, codex, dsh, or agy) by default — or on a chosen CLI via pnpm memory set --extract-agent <agent>.
  • Zero-tool isolation: Memory jobs run in an empty temp folder with tools disabled. Codex runs out of the box when zero MCP servers are configured (if you configure Codex MCP servers, it fails closed and prints a Fix: command to switch --extract-agent); Claude and Codex isolation flags avoid double quotes so Windows .cmd shims work cleanly.
  • Pausing saves: Running pnpm memory off pauses both extraction and weekly consolidation (manual pnpm memory consolidate refuses unless --force is passed; --dry-run is always allowed).

See AGENTS.md §13 and docs/harness.md for the full memory lifecycle.

🧩 Skills

🏠 Project-owned skills

Skill What it does
workspace-setup Initialise or repair this workspace (deps, skills, links, hooks, memory).
context-manager Context-degradation prevention and recovery alongside the context monitor.
web-browsing Tool selection and workflows for web interaction, real-browser sessions, e2e.

📦 External skills (skills-lock.json)

External skills are not committed. Install the recommended set with pnpm skills:install; each skill is installed locally into the git-ignored .agents/skills/. Sources and hashes are pinned in skills-lock.json; each upstream repository ships its own license.

✨ Kyoten Skills (shino369/kyoten-skills, MIT)

Skill What it does
dependency-update Dependabot-style pnpm updates with analyze_deps.mjs.
security-update CVE and audit patching with release-age checks.
transparent-background Flat-background image → transparent PNG with clean edges; specks and recolour.
translation-expertise EN ↔ JA ↔ zh-TW house styles, 1:1 structural parity, and Taiwan/JA terminology trap guards.

🌐 Browser & Web

Skill What it does Source Credit
agent-browser Browser automation CLI: navigation, forms, screenshots, scraping, app testing. vercel-labs/agent-browser Vercel Labs
browser-use Direct browser control over CDP: automation, scraping, screenshots. browser-use/browser-use Browser Use
playwright-cli Playwright browser automation and e2e test workflows. microsoft/playwright-cli Microsoft

Browser-tool selection is defined in AGENTS.md §8: agent-browser is the default for ad-hoc interaction, browser-use covers autonomous / Python / real-Chrome / cloud work, and Playwright is reserved for e2e tests.

🛠️ Engineering Workflow

Skill What it does Source Credit
code-review Two-axis review (repo standards + originating spec) in parallel sub-agents. mattpocock/skills Matt Pocock
diagnosing-bugs Structured diagnosis loop for hard bugs and performance regressions. mattpocock/skills Matt Pocock
tdd Test-driven development with red-green-refactor. mattpocock/skills Matt Pocock

🎨 Meta & Tooling

Skill What it does Source Credit
skill-creator Create, edit, benchmark, and optimise agent skills. anthropics/skills Anthropic

Personal or optional skills (for example i-have-adhd) are not in the recommended lock. Install them individually with pnpm dlx skills add ayghri/i-have-adhd --skill i-have-adhd --copy --agent claude-code.

All third-party skills remain under their upstream licenses. Installed copies do not include license files except skill-creator, which ships LICENSE.txt at .agents/skills/skill-creator/LICENSE.txt; check the source repositories above for the others.

⚙️ Managing skills

Project-owned skills live in .agents/skills/ and are committed to this repository. To add one, follow "Adding a project-owned skill" in .agents/skills/workspace-setup/SKILL.md.

External skills are not committed. Install the recommended set from skills-lock.json with Vercel's skills CLI (the skills.sh ecosystem):

pnpm skills:install                      # install everything in skills-lock.json
pnpm skills:install --skip <name>        # skip optional skills
pnpm skills:install --only <name>        # install only the named skills (comma-separated)
pnpm skills:update                       # update installed skills
pnpm skills:check                        # verify lock entries are installed
pnpm skills:link                         # (re)link .agents/skills into .claude/skills

Installation uses skills.sh's default layout with --agent claude-code codex: the real files land in .agents/skills/<name>/ (read natively by Codex and Antigravity) and .claude/skills/<name> is a relative symlink to them. skills:link creates the same links for project-owned skills, migrates old copied installs, prunes stale links, and falls back to directory junctions on Windows. External installs remain untracked; commit skills-lock.json whenever it changes. skills:check verifies every lock entry is installed with a matching frontmatter name.

The lock's hash is a source snapshot hash, not reproducible from the installed copy, so review content changes via git diff. On Windows, skills:update may exit 127 after a successful update due to an upstream crash — verify the files changed before treating it as a failure.

To add a skill manually, run pnpm dlx skills add <owner/repo> --skill <name> --agent claude-code codex -y, then pnpm skills:link; it stays local and untracked.

🔧 Skill runtime prerequisites

Most skills are instructions only. These require a local runtime:

Skill Runtime Check / install
agent-browser agent-browser CLI pnpm exec agent-browser --version; run pnpm exec agent-browser install once, then pnpm exec agent-browser ... (devDependency)
browser-use browser-use CLI browser-use --version; install with uv tool install --python 3.12 browser-use
playwright-cli local Playwright pnpm exec playwright --version; run pnpm exec playwright cli ...
skill-creator Python 3.12 + PyYAML uv run --with pyyaml --python 3.12 python ... from the skill directory
transparent-background Python 3.12 + Pillow, NumPy, SciPy uv run --python 3.12 --with pillow --with numpy --with scipy python -I .agents/skills/transparent-background/scripts/imgalpha.py --help
dependency-update gh CLI gh --version; install from https://cli.github.com/ (also used for PR attachments)
Playwright e2e Chromium pnpm exec playwright install chromium

npm commands are blocked in this workspace. Use pnpm dlx for one-off CLIs, pnpm add -D + pnpm exec for project-local binaries, and uv tool / uvx for Python CLIs. Avoid pnpm add -g: global installs bypass the workspace lockfile and supply-chain settings.

The browser-use skill comes from browser-use/browser-use and requires its browser-use CLI (which pulls in browser-harness as a pinned dependency). The agent-browser skill is invoked via pnpm exec agent-browser ... because no global shim is installed.

Browser skills that attach to local Chrome need its CDP endpoint: either enable chrome://inspect/#remote-debugging, or launch an isolated Chrome with --remote-debugging-port=9222 --user-data-dir=<profile> and set BU_CDP_URL=http://127.0.0.1:9222 for browser-use.

🎭 Agents & Rules

Role Prompts (.claude/agents/)

Canonical role prompts live in .claude/agents/*.md and sync to .codex/agents/*.toml and .agents/agents/*.md via pnpm harness sync:

Agent Purpose
planner Turns a goal into small, verifiable steps with deps (pnpm task).
verifier Independent PASS/FAIL: runs verify, checks acceptance and tests.
reviewer Clean-context review round from a brief; findings for triage.
security-reviewer Security-focused review: auth, injection, XSS, secrets, dependencies.
test-runner Runs tests and reports failures and coverage.
trilingual-translator EN / JA / zh-TW translation in initial, proofread, and refine roles.

Path-Scoped Rules (.claude/rules/)

Always-on guidance lives in AGENTS.md so every harness sees it. .claude/rules/ keeps path-scoped rules that Claude Code auto-loads and AGENTS.md directs other agents to read:

Rule Scope Purpose
testing Test files Vitest, 95% coverage floor, mocking.
working-with-script Scripts Node-first scripts, error handling, tests.

🪝 Hooks

Gemini-chan laughing off a Stop hook coverage-lock collision

Shared hook logic lives in utils/harness/hooks.js and .claude/hooks/, wired into Claude Code, Codex, Antigravity CLI, and DSH via pnpm harness sync:

Hook Event Purpose
session_start.js SessionStart Injects the active task's resume brief and available tools summary.
pre_compact.js PreCompact Appends a checkpoint to the task's NOTES.md.
task_loop.js Stop, UserPromptSubmit Inner loop: verify, then guide through the clean-context review loop.
context_monitor.js UserPromptSubmit Warns at 20% / 40% / 60% of the context window.
audit_logger.js PostToolUse (*) Logs tool use to logs/<YYYYMMDD>/logging.jsonl.
auto_format.js PostToolUse (Edit|Write) Runs Prettier on edited files.
guard.js PreToolUse Blocks secret access, rm, npm, and destructive git commands.
utils/memory/hook.js SessionStart, UserPromptSubmit, PreToolUse, PostToolUseFailure, SessionEnd Memory core block, prompt/failure recall, announcements, and extraction.

The context monitor defaults to a 1M window; set CLAUDE_CONTEXT_WINDOW to override it.

🌍 Translation

Ask your agent to translate, or invoke the trilingual-translator subagent. The translation-expertise skill supplies house styles, 1:1 structural parity rules, and JA / zh-TW terminology trap guards:

  • English ↔ Japanese (日本語) ↔ Traditional Chinese (繁體中文, Taiwan defaults)
  • Optional 3-stage initial → proofread → refine workflow writing drafts to the task's translated/ folder
  • File and URL sources: fetch tools for static pages; agent-browser / browser-use for JS-heavy pages (Playwright stays reserved for e2e tests)

🧪 Testing

Unit and integration tests use Vitest. Across the measured suite, including utils/, .claude/hooks/, and project-owned .agents/skills/, the coverage floor is 95% for statements, branches, functions, and lines.

pnpm test
pnpm test:coverage   # enforces the 95% coverage floor

Test rules live in .claude/rules/testing.md, with deeper guides under docs/testing/.

End-to-end tests use Playwright in e2e/ (passes cleanly with an empty suite until *.e2e.* tests are added):

pnpm exec playwright install chromium
pnpm test:e2e

🛡️ Security & Configuration

📦 Package Management

pnpm 12.14.0 is pinned via packageManager and enforced by engines.pnpm / engineStrict. All dev dependencies use the dev catalog:

pnpm add -D some-package --save-catalog-name=dev

pnpm-workspace.yaml supply-chain hardening:

  • minimumReleaseAge: 10080 — wait 7 days before adopting a new package version
  • strictPeerDependencies: true
  • engineStrict: true
  • ignoreScripts: true with explicit allowBuilds (esbuild: true, agent-browser: false)
  • trustPolicy: no-downgrade

🔐 Permissions & Guardrails

Workspace permissions are configured in .claude/settings.json and mirrored across harnesses by utils/harness/hooks.js:

  • Allowed operations: pnpm commands (including undoable pnpm task rm), local git (status, diff, log, add, commit, switch -c, checkout -b, rev-parse, show), node only for repo scripts (utils/, .claude/hooks/, .agents/skills/), and basic directory inspection (ls, dir, cd, pwd, echo, type, mkdir). Arbitrary python, node, cat, and curl are not pre-approved.
  • Requires confirmation: git push, rebase, merge, cherry-pick, and force-kill signals (kill -9, pkill, killall).
  • Denied operations: secret files (.env*, secrets/, *.pem, *.key, credentials.json, ~/.ssh/, ~/.aws/), rm (use pnpm task rm instead — moves files to tasks/.trash/ for 7 days), npm, sudo / admin commands, destructive git (force push, reset --hard, clean -fd, branch -D, tag -d), and pnpm publish.

Local overrides belong in .claude/settings.local.json (git-ignored).

🔌 MCP Servers

Local MCP configuration lives in .mcp.json (git-ignored). Copy .mcp.json.example and adjust the paths for your machine.

🤝 Contributing

This is a personal workspace, but forks, ideas, and suggestions are always welcome! Before opening a PR, make sure pnpm check passes.

External skills are managed with skills.sh (skills-lock.json); project-owned skills live in .agents/skills/.

💖 Credits

📄 License

The original contents of this repository are licensed under ISC. External skills are not distributed here; when installed, they remain under their upstream licenses.

Yorumlar (0)

Sonuc bulunamadi