### Install Genshijin using install.sh Source: https://github.com/interfacex-co-jp/genshijin/blob/main/CHANGELOG.md Use this script for a smart, multi-agent installer that automatically detects and installs Genshijin for various code editors. Supports dry-run and selective installation. ```bash #!/bin/bash # smart multi-agent installer # Claude Code/Cursor/Windsurf/Cline/Copilot auto-detect -> native install # --dry-run / --force / --only / --all / --minimal / --list ./install.sh --all ``` -------------------------------- ### Install Genshijin via Script Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/index.html Automate the installation of Genshijin across various IDE agents by running the provided installation script. Supports dry runs, force installations, and agent-specific installations. ```bash # macOS / Linux curl -fsSL https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.sh | bash ``` ```powershell # Windows iwr -useb https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.ps1 | iex ``` -------------------------------- ### Install Genshijin from GitHub (Development) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Install the latest development version of Genshijin directly from its GitHub repository. ```bash claude plugin marketplace add InterfaceX-co-jp/genshijin /plugin install genshijin@InterfaceX-co-jp/genshijin ``` -------------------------------- ### Manual Installation of genshijin Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Manually install genshijin into a project by creating the necessary directory structure and downloading the SKILL.md file. ```bash mkdir -p .claude/skills/genshijin curl -o .claude/skills/genshijin/SKILL.md \ https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/skills/genshijin/SKILL.md ``` -------------------------------- ### Manual Installation: Project-Specific Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Manually install Genshijin for a specific project by downloading the SKILL.md file into the project's .claude/skills directory. ```bash # リポジトリのルートで実行 mkdir -p .claude/skills/genshijin curl -o .claude/skills/genshijin/SKILL.md \ https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/skills/genshijin/SKILL.md ``` -------------------------------- ### Install Genshijin Shrink Middleware Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Installation instructions for the genshijin-shrink middleware, which compresses MCP server tool descriptions. Supports npm install and direct npx execution. ```bash npm install -g genshijin-shrink # または npx で直接実行 ``` -------------------------------- ### Smart Multi-Agent Installer Usage Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Installer script for setting up multi-agent environments. Detects various AI platforms and installs natively. Supports dry-run, force, and filtering options. ```bash ./install.sh --all --dry-run ``` -------------------------------- ### Manual Installation: Global Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Manually install Genshijin globally for all projects by downloading the SKILL.md file into your user's .claude/skills directory. ```bash mkdir -p ~/.claude/skills/genshijin curl -o ~/.claude/skills/genshijin/SKILL.md \ https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/skills/genshijin/SKILL.md ``` -------------------------------- ### Install genshijin-shrink Source: https://github.com/interfacex-co-jp/genshijin/blob/main/mcp-servers/genshijin-shrink/README.md Install the genshijin-shrink package globally using npm or execute it directly with npx. ```bash npm install -g genshijin-shrink # or 直接実行 npx genshijin-shrink [...args] ``` -------------------------------- ### Check Claude CLI Installation Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/index.html Verify if the Claude CLI is installed and configured. If logged in, no additional setup is required for using the CLI. ```bash claude --version ``` -------------------------------- ### Install Genshijin using install.ps1 Source: https://github.com/interfacex-co-jp/genshijin/blob/main/CHANGELOG.md Use this PowerShell script for a smart, multi-agent installer that automatically detects and installs Genshijin for various code editors. Supports dry-run and selective installation. ```powershell #!powershell # smart multi-agent installer # Claude Code/Cursor/Windsurf/ Cline/Copilot auto-detect -> native install # --dry-run / --force / --only / --all / --minimal / --list ./install.ps1 --all ``` -------------------------------- ### Install genshijin using Smart Multi-Agent Installer Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Automate the installation of genshijin across various agents like Claude Code, Cursor, and Copilot. Supports macOS/Linux and Windows PowerShell. ```bash # macOS / Linux curl -fsSL https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.sh | bash # ドライラン(変更なし確認) curl -fsSL https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.sh | bash -s -- --dry-run # 特定エージェントのみ curl -fsSL https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.sh | bash -s -- --only cursor # Windows PowerShell iwr -useb https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.ps1 | iex ``` -------------------------------- ### Install Genshijin via npx skills Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Add the Genshijin plugin using the npx skills command, a third-party installation method. ```bash npx skills add InterfaceX-co-jp/genshijin ``` -------------------------------- ### Smart Multi-Agent Installer (PowerShell) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md PowerShell version of the smart multi-agent installer. Handles native installations and supports various options for deployment control. ```powershell Set-ExecutionPolicy Bypass -Scope Process -Force; .\install.ps1 --force --only Gemini ``` -------------------------------- ### Genshijin Hook Installation Scripts Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Shell scripts for installing and uninstalling Genshijin hooks for session start and user prompt submission. Includes Windows PowerShell equivalents. ```bash # SessionStart フック(genshijin-activate.js)は plugin.json に登録済み # UserPromptSubmit フック(genshijin-mode-tracker.js)も同様に自動登録 # standalone フック(プラグイン未使用時) bash hooks/install.sh # インストール bash hooks/install.sh --force # 再インストール bash hooks/uninstall.sh # アンインストール # Windows hooks/install.ps1 hooks/uninstall.ps1 ``` -------------------------------- ### Install Anthropic API Client Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/index.html Install the necessary Python package for direct API key usage. Ensure your API key is set as an environment variable. ```bash pip install anthropic export ANTHROPIC_API_KEY=sk-ant-... ``` -------------------------------- ### Install Genshijin Plugin via Claude Code Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Install the Genshijin plugin directly from the Claude Code official plugin directory for a one-liner installation. ```bash /plugin install genshijin ``` -------------------------------- ### Install Genshijin on macOS/Linux Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Use curl to download and execute the installation script for Genshijin on macOS and Linux systems. Supports various agents and options. ```bash curl -fsSL https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.sh | bash ``` -------------------------------- ### Install Genshijin Hooks Standalone Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Install Genshijin hooks directly into ~/.claude without using a plugin. This script handles safe merging into settings.json. ```bash bash hooks/install.sh ``` -------------------------------- ### Genshijin SKILL.md Output Contract Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/article.md This example shows a strict output format defined in SKILL.md for subagents, ensuring consistent and machine-readable results, which is key for LLM tool development. ```text 出力形式: — `` — <≤6語メモ> 3行以上時は1語ヘッダ付与: Defs: / Refs: / Callers: / Tests: / Imports: 0ヒット → No match. 末尾 → 集計: 2 defs, 5 refs. ``` -------------------------------- ### Install Genshijin Plugin Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/index.html Use this command to add the Genshijin plugin to your Claude Code environment. ```bash claude plugin marketplace add InterfaceX-co-jp/genshijin ``` -------------------------------- ### Caveman Description Frontmatter Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Example of a 'description' frontmatter in a SKILL.md file, specifying triggers for the Caveman mode. ```yaml ```yaml description: > ...Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested. ``` ``` -------------------------------- ### Load Benchmark Data and Render Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/index.html Fetches benchmark data from 'benchmark.json' and 'benchmark_en.json', stores them, and then renders the initial benchmark table. It also initializes the JSON viewer and example rendering. ```javascript Promise.all([ fetch('benchmark.json').then(r => r.json()).catch(() => null), fetch('benchmark_en.json').then(r => r.json()).catch(() => null), ]).then(([ja, en]) => { if (ja) benchData.ja = ja; if (en) benchData.en = en; renderBenchTable('ja'); document.getElementById('json-viewer').innerHTML = syntaxHighlight(ja || en || {}); if (ja) { exampleIds.forEach((id, i) => { const item = ja.results.find(r => r.id === id); if (!item) return; renderExample(exPrefixes[i] + '-normal', '通常', item.median_normal, item.normal_texts[1]); renderExample(exPrefixes[i] + '-caveman', 'caveman', item.median_caveman, item.caveman_texts[1]); renderExample(exPrefixes[i] + '-genshijin', 'genshijin', item.median_genshijin, item.genshijin_texts[1]); }); } }); ``` -------------------------------- ### SQL Example: Database Connection Pooling Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin/SKILL.md This example illustrates the concept of database connection pooling, where existing connections are reused instead of creating new ones for each request. This is a common optimization technique to avoid handshake overhead, especially under high load. ```sql プール=DB接続再利用。ハンドシェイク省略→高負荷時高速。 ``` -------------------------------- ### Genshijin Chaining Pattern Example Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Demonstrates a three-step chaining pattern using Genshijin sub-agents for code investigation, modification, and review. ```text # ステップ1: investigator で対象ファイル特定 Task: genshijin-investigator → "verifyToken 関数の定義と全呼出箇所を列挙" # ステップ2: builder に path:line 渡して修正 Task: genshijin-builder → "src/auth/middleware.ts:42-45 の null チェック追加" # ステップ3: reviewer で差分検証 Task: genshijin-reviewer → "直前の変更 diff をレビュー" ``` -------------------------------- ### Caveman Persistence Section Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Example of a 'Persistence' section in a SKILL.md file, defining how the Caveman mode should behave across responses. ```markdown ```markdown ## Persistence ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure. Off only: "stop caveman" / "normal mode". ``` ``` -------------------------------- ### Install Genshijin on Windows PowerShell Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Use Invoke-WebRequest (iwr) to download and execute the Genshijin installation script on Windows PowerShell. Supports various agents and options. ```powershell iwr -useb https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/install.ps1 | iex ``` -------------------------------- ### Caveman Agent Configuration Example (Gemini CLI) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Configuration files for the Gemini CLI agent within the Caveman multi-agent system. ```text Agent: Gemini CLI Files: `GEMINI.md` + `gemini-extension.json` ``` -------------------------------- ### Caveman Agent Configuration Example (Windsurf) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Configuration file for the Windsurf agent within the Caveman multi-agent system. ```text Agent: Windsurf Files: `.windsurf/rules/caveman.md` ``` -------------------------------- ### Caveman Agent Configuration Example (Copilot) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Configuration files for the Copilot agent within the Caveman multi-agent system. ```text Agent: Copilot Files: `.github/copilot-instructions.md` + `AGENTS.md` ``` -------------------------------- ### Genshijin-compress Prerequisites Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Set up the necessary environment for using the genshijin-compress sub-skill. This involves installing the anthropic Python package and setting your API key, or ensuring you are logged into the Claude CLI. ```bash # オプションA: API key 直接利用 pip install anthropic export ANTHROPIC_API_KEY=sk-ant-... # オプションB: claude CLI ログイン済みなら 追加設定不要(CLI fallback) claude --version ``` -------------------------------- ### Caveman Agent Configuration Example (Cursor) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Configuration file for the Cursor agent within the Caveman multi-agent system. ```text Agent: Cursor Files: `.cursor/rules/caveman.mdc` ``` -------------------------------- ### Caveman Installer Script (Shell) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Shell script for installing Caveman, usable even without plugins. It safely merges settings into settings.json, respecting existing statuslines. ```shell ```bash # install.sh # Standalone installer, usable even without plugins. # Safely merges into settings.json, respecting existing statuslines. ``` ``` -------------------------------- ### React Example: Component Re-rendering Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin/SKILL.md This example explains why React components might re-render due to new object references being created on each render. It suggests using `useMemo` to optimize performance by memoizing the result of expensive computations or preventing unnecessary re-renders. ```javascript レンダリング毎 新オブジェクト参照 生成。inline obj prop = 新参照 = 再レンダリング。`useMemo`で包む。 ``` -------------------------------- ### Caveman Installer Script (PowerShell) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md PowerShell script for installing Caveman, usable even without plugins. It safely merges settings into settings.json, respecting existing statuslines. ```powershell ```powershell # install.ps1 # Standalone installer, usable even without plugins. # Safely merges into settings.json, respecting existing statuslines. ``` ``` -------------------------------- ### Genshijin Investigator Output Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/agents/genshijin-investigator.md This example demonstrates the typical output format of the Genshijin Investigator agent when answering a query about symbol definitions and callers. It includes categorized lists of findings with file paths, line numbers, and brief descriptions. ```text Defs: - hooks/genshijin-config.js:81 — `safeWriteFlag` — atomic write w/ O_NOFOLLOW - hooks/genshijin-config.js:160 — `readFlag` — paired reader Callers: - hooks/genshijin-mode-tracker.js:33,87 - hooks/genshijin-activate.js:40 Tests: - tests/test_symlink_flag.js — 12 cases 2 defs, 3 callers, 1 test file. ``` -------------------------------- ### Caveman Agent Configuration Example (Cline) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Configuration file for the Cline agent within the Caveman multi-agent system. ```text Agent: Cline Files: `.clinerules/caveman.md` ``` -------------------------------- ### Standalone Genshijin Hook Installer Source: https://github.com/interfacex-co-jp/genshijin/blob/main/CHANGELOG.md Install or uninstall Genshijin hooks using these standalone scripts. They ensure safe merging into settings.json even if not using the plugin. ```bash # hooks/install.sh # Standalone hook installer script # Example usage: # ./hooks/install.sh ``` ```bash # hooks/uninstall.sh # Standalone hook uninstaller script # Example usage: # ./hooks/uninstall.sh ``` -------------------------------- ### Genshijin Normal Mode Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Example of the default 'Normal' mode, which removes honorifics and uses minimal particles, resulting in a more concise, caveman-like communication style. ```text Before: > こちらの問題は、レンダリングが行われるたびに新しいオブジェクトの参照が生成されてしまうことが原因となっております。 After: > レンダリング毎に新オブジェクト参照が生成。インラインオブジェクトprop = 新しい参照 = 再レンダリング。`useMemo`で包む。 ``` -------------------------------- ### Genshijin Extreme Mode Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Example of the 'Extreme' mode, which uses abbreviations, arrow notation, and single-word answers for maximum compression, resembling telegram-style communication. ```text Before: > データベースのコネクションプーリングというのは、リクエストが来るたびに新しい接続を確立するのではなく、あらかじめ作成しておいた接続を再利用する仕組みのことです。 After: > プール = DB接続再利用。ハンドシェイク省略 → 高負荷時に高速。 ``` -------------------------------- ### Genshijin Builder Output Format Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Example output format for the genshijin-builder sub-agent, indicating code modifications. ```text # genshijin-builder 出力形式 src/auth/middleware.ts:42-45 — null guard 追加。 verified: re-read OK ``` -------------------------------- ### Render Example Card Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/index.html JavaScript function to render an example card with a label, token count, and converted Markdown content. It populates a specified HTML element with the generated content. ```javascript function renderExample(elId, label, tokens, text) { const el = document.getElementById(elId); el.innerHTML = '
' + '' + escapeHtml(label) + '' + '' + tokens.toLocaleString() + ' tokens' + '
' + '
' + mdToHtml(text) + '
'; } ``` -------------------------------- ### Claude Code Settings for Genshijin Shrink Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Configuration example for Claude Code's settings.json to integrate genshijin-shrink with MCP servers. ```jsonc { "mcpServers": { "fs-shrunk": { "command": "npx", "args": [ "genshijin-shrink", "npx", "@modelcontextprotocol/server-filesystem", "/path/to/dir" ] }, "github-shrunk": { "command": "npx", "args": [ "genshijin-shrink", "npx", "@modelcontextprotocol/server-github" ] } } } ``` -------------------------------- ### Genshijin Polite Mode Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Example demonstrating the 'Polite' mode, which removes filler words and introductory phrases while retaining politeness. This mode is suitable for business emails. ```text Before: > ご質問ありがとうございます。お調べしたところ、こちらの問題につきましては、認証ミドルウェアにおけるトークンの有効期限チェックの部分に原因がある可能性が考えられます。 After: > コンポーネントが再レンダリングされるのは、レンダリングごとに新しいオブジェクト参照が生成されるためです。`useMemo`で解決できます。 ``` -------------------------------- ### Example 2: Technical Description Compression Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-compress/SKILL.md Illustrates the compression of a technical description of a microservice architecture. It shortens phrases and removes connecting words while retaining key technical terms and their functions. ```text 原文: > このアプリケーションは以下のコンポーネントを持つマイクロサービスアーキテクチャを採用しています。APIゲートウェイが全ての受信リクエストを処理し、適切なサービスにルーティングします。認証サービスはユーザーセッションとJWTトークンの管理を担当します。 圧縮: > マイクロサービスアーキテクチャ。APIゲートウェイ 全受信リクエストをサービスにルーティング。認証サービス ユーザーセッション + JWTトークン管理。 ``` -------------------------------- ### Genshijin Reviewer Output Format Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Example output format for the genshijin-reviewer sub-agent, highlighting bugs and risks in code. ```text # genshijin-reviewer 出力形式 src/api/users.ts:23: 🔴 bug: .find() null unchecked. add guard. src/api/users.ts:56: 🟡 risk: no retry on 429. wrap withBackoff(3). totals: 1🔴 1🟡 0🔵 0❓ ``` -------------------------------- ### Standalone Genshijin Hook Installer (PowerShell) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/CHANGELOG.md Install or uninstall Genshijin hooks using these standalone PowerShell scripts. They ensure safe merging into settings.json even if not using the plugin. ```powershell # hooks/install.ps1 # Standalone hook installer script (PowerShell) # Example usage: # .oots/install.ps1 ``` ```powershell # hooks/uninstall.ps1 # Standalone hook uninstaller script (PowerShell) # Example usage: # .oots/uninstall.ps1 ``` -------------------------------- ### Example 1: Text Compression Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-compress/SKILL.md Demonstrates the compression of a sentence, removing polite language, filler words, and redundant phrases to create a more concise version. This is useful for reducing token count in natural language inputs. ```text 原文: > main ブランチにプッシュする前には必ずテストスイートを実行するようにしてください。これはバグを早期に発見し、壊れたビルドが本番環境にデプロイされるのを防ぐために重要です。 圧縮: > main push前テスト実行。バグ早期発見、壊れビルド本番デプロイ防止。 ``` -------------------------------- ### Caveman Agent Configuration Example (Codex) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Configuration files for the Codex agent within the Caveman multi-agent system. ```text Agent: Codex Files: `.codex/hooks.json`, `.codex/config.toml` ``` -------------------------------- ### Concise Bug Fix Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-review/SKILL.md Demonstrates the expected format for reporting a bug. It specifies the line number, severity, problem, and proposed solution concisely. ```text L42: 🔴 バグ: .find() 後 user null 可。.email 前にガード追加。 ``` -------------------------------- ### React Example: Memoization for Re-rendering Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin/SKILL.md This concise example demonstrates how to prevent unnecessary re-renders in React components by using `useMemo`. It highlights the cause of re-renders (inline object props creating new references) and the solution. ```javascript inline obj prop → 新ref → 再レンダリング。`useMemo`。 ``` -------------------------------- ### Concise Risk Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-review/SKILL.md Illustrates the format for reporting a potential risk. It highlights the line number, severity, the risk, and a specific solution. ```text L23: 🟡 リスク: 429 リトライなし。withBackoff(3) で包む。 ``` -------------------------------- ### Update Genshijin Standalone Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Instructions for updating the standalone version of Genshijin by pulling the latest changes and running the install script. ```bash # Standalone 版 cd /path/to/genshijin git pull bash hooks/install.sh --force ``` -------------------------------- ### Benchmark Execution Script Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Python script for running Genshijin benchmarks. Requires installing dependencies and setting the Anthropic API key. ```bash cd benchmarks pip install -r requirements.txt export ANTHROPIC_API_KEY=sk-ant-... # 日本語ベンチマーク(3試行、README 自動更新) python run.py --trials 3 --update-readme ``` -------------------------------- ### Genshijin Extreme Mode Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/article.md Shows 'Extreme Mode' for maximum compression, akin to a telegram, completely disregarding Japanese grammar. ```text Before: 「データベースのコネクションプーリングというのは...」 After: 「プール=DB接続再利用。ハンドシェイク省略→高負荷時高速。」 ``` -------------------------------- ### Vanilla Claude Code Explore Agent Output Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/article.md This is an example of the verbose output from a vanilla Claude Code 'Explore' agent, which can quickly consume context budget in long sessions. ```text Sure! I'll search for the safeWriteFlag function. I found it defined in hooks/genshijin-config.js at line 81. It's an atomic write function that uses O_NOFOLLOW to prevent symlink attacks. It's called from... (2,000トークン) ``` -------------------------------- ### Concise Nitpick Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-review/SKILL.md Shows the format for a 'nitpick' or minor suggestion. It includes the line range, severity, issue, and suggested refactoring. ```text L88-140: 🔵 nit: 50行fn 4責務。validate/normalize/persist 抽出。 ``` -------------------------------- ### Genshijin HTML Layout Fix Source: https://github.com/interfacex-co-jp/genshijin/blob/main/CHANGELOG.md Corrects layout issues on mobile/iOS in docs/index.html, specifically for the 'Automation Features' and 'Getting Started with Genshijin Compress' sections. It ensures `.mode` cards stack vertically on smaller screens. ```css /* docs/index.html mobile/iOS layout fix */ @media (max-width: 600px) { .mode { flex-direction: column; } /* Prevent cramped layout from min-width: 100px + white-space: nowrap */ .example-card pre, .json-viewer { min-width: unset; white-space: normal; } } ``` -------------------------------- ### Configure genshijin-shrink in MCP Client Source: https://github.com/interfacex-co-jp/genshijin/blob/main/mcp-servers/genshijin-shrink/README.md Configure your MCP client (e.g., Claude Code) to use genshijin-shrink to wrap an upstream MCP server. This example shows how to set up a filesystem server with shrinking enabled. ```jsonc { "mcpServers": { "fs-shrunk": { "command": "npx", "args": [ "genshijin-shrink", "npx", "@modelcontextprotocol/server-filesystem", "/path/to/dir" ] } } } ``` -------------------------------- ### Caveman Activation Filter Injection Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Reference to a JavaScript file that implements filtering intensity lines from the intensity table during SessionStart for input token reduction. ```javascript ```javascript // /tmp/caveman-ref/hooks/caveman-activate.js // Extracts only the active level's intensity lines from the intensity table. ``` ``` -------------------------------- ### Conventional Commit Example: New API Endpoint Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-commit/SKILL.md Use this format for new features, especially when the 'why' requires explanation. Ensure the subject line is concise and imperative, and the body details the reasoning and any related issues. ```markdown feat(api): GET /users/:id/profile 追加 モバイルクライアント コールドスタート時 LTE帯域削減のため、完全user payload不要なprofileデータ 取得エンドポイントが必要。 Closes #128 ``` -------------------------------- ### Genshijin Automation Hooks Installation (Windows) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/article.md PowerShell script commands to install Genshijin hooks manually on Windows systems. This is an alternative to the Claude Code plugin installation. ```powershell ./hooks/install.ps1 ./hooks/uninstall.ps1 ``` -------------------------------- ### Initialize Genshijin Rules for a Repository Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Use npx to run the genshijin-init.js tool, which generates rule files for various IDE agents within the current repository. This command is idempotent. ```bash npx -y https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/tools/genshijin-init.js ``` -------------------------------- ### Genshijin Init Tool Usage Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/caveman-diff-analysis.md Tool for deploying multi-agent rules to various platforms like Cursor, Windsurf, and Cline. Supports dry-run, force, and agent-specific deployments. ```javascript node ./tools/genshijin-init.js --force --only Cursor ``` -------------------------------- ### Genshijin Instructions for Copilot Source: https://github.com/interfacex-co-jp/genshijin/blob/main/CHANGELOG.md Configure Genshijin instructions for Copilot by placing the instructions file in the .github/ directory. ```markdown # .github/copilot-instructions.md # Instructions configuration for GitHub Copilot # Example content: # "When writing code, always consider using Genshijin compression to reduce token usage." ``` -------------------------------- ### Initialize Genshijin Multi-Agent Rules Source: https://github.com/interfacex-co-jp/genshijin/blob/main/CHANGELOG.md Use genshijin-init.js to deploy multi-agent rules to various platforms like Cursor, Windsurf, Cline, Copilot, and AGENTS.md. This script is idempotent and supports dry-run and force options. ```javascript // tools/genshijin-init.js // Deploy rules to Cursor/Windsurf/Cline/Copilot/AGENTS.md // Sentinel check for idempotency, --dry-run / --force / --only npx genshijin-init.js --only genshijin-builder ``` -------------------------------- ### Genshijin Multi-Agent Initialization Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Command to initialize Genshijin rules across repositories for multi-agent support. Includes options for dry runs and targeting specific agents. ```bash # per-repo にルールファイルを一括投下(idempotent) npx -y https://raw.githubusercontent.com/InterfaceX-co-jp/genshijin/main/tools/genshijin-init.js # ドライラン確認 npx -y .../genshijin-init.js --dry-run # 特定エージェントのみ npx -y .../genshijin-init.js --only cursor npx -y .../genshijin-init.js --only windsurf ``` -------------------------------- ### Genshijin Automation Hooks Installation (Unix) Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/article.md Shell script commands to install Genshijin hooks manually on macOS or Linux systems. This method is for users not using the Claude Code plugin. ```bash ./hooks/install.sh ./hooks/uninstall.sh ``` -------------------------------- ### Run Benchmark Script Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Execute the benchmark script to test performance with different languages and update README files. ```bash python run.py --lang en --trials 3 --update-readme ``` -------------------------------- ### Genshijin Automation: SessionStart Hook Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md The SessionStart hook automatically injects the currently active Genshijin mode rules into the hidden context to prevent style drift during long conversations. ```text セッション開始毎に `SKILL.md` を読み、現アクティブレベルの該当行のみフィルタして hidden context に注入。多ターン経過後の敬語回帰・フィラー漂流を防ぐ anchor。 ``` -------------------------------- ### Genshijin Investigator Output Format Source: https://context7.com/interfacex-co-jp/genshijin/llms.txt Example output format for the genshijin-investigator sub-agent, detailing code locations and matches. ```text # genshijin-investigator 出力形式 src/auth/middleware.ts:42 — `verifyToken` — JWT 期限チェック src/auth/middleware.ts:87 — `verifyToken` — 呼出元 route handler 集計: 2 match, 1 file。 ``` -------------------------------- ### Temporary Usage with --plugin-dir Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Use Genshijin temporarily for a single session by specifying its directory with the --plugin-dir flag. ```bash claude --plugin-dir ./path/to/genshijin ``` -------------------------------- ### Configure Genshijin with a JSON file Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Create and configure Genshijin using a JSON configuration file located at ~/.config/genshijin/config.json. This allows for persistent settings. ```json { "defaultMode": "extreme" } ``` -------------------------------- ### Conventional Commit Example: Simple Fix Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-commit/SKILL.md For minor fixes that are self-explanatory, a concise subject line without a body is sufficient. ```markdown fix(auth): トークン期限チェック境界条件修正 ``` -------------------------------- ### Uninstall Genshijin Hooks Standalone Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Remove Genshijin hooks installed directly into ~/.claude. Use the uninstall script for clean removal. ```bash bash hooks/uninstall.sh ``` -------------------------------- ### Execute genshijin-compress Script Source: https://github.com/interfacex-co-jp/genshijin/blob/main/skills/genshijin-compress/SKILL.md This command executes the genshijin-compress script from the SKILL.md directory. It requires changing to the directory and then running the script with the absolute file path as an argument. ```bash cd && python3 -m scripts <絶対ファイルパス> ``` -------------------------------- ### Genshijin Safety Valve Example Source: https://github.com/interfacex-co-jp/genshijin/blob/main/docs/article.md Demonstrates the safety mechanism where Genshijin automatically reverts to normal Japanese for confirmation of destructive operations. ```text > ⚠️ 警告: `users`テーブル全行削除。取消不可。 > DROP TABLE users; > > 原始人復帰。バックアップ確認。 ``` -------------------------------- ### Reinstall Genshijin Hooks Standalone Source: https://github.com/interfacex-co-jp/genshijin/blob/main/README.md Force a reinstallation of Genshijin hooks, overwriting existing configurations if necessary. Use the --force flag for this operation. ```bash bash hooks/install.sh --force ```