ccpocket: Skill for Claude Code

.claude/skills/test-bridge/SKILL.md

test-bridge is a skill for Claude Code from K9i-0/ccpocket. It costs 25 tokens per session (769 once invoked), scanned A, original, MIT.

A Japanese-language guide for testing and type-checking a TypeScript Bridge Server. Type-checking checks that code uses values and functions in valid ways before it runs.

In plain words
What is it for?
It helps run Bridge Server unit tests with Vitest, check TypeScript types, optionally create coverage reports, and write tests for functions and classes using the project’s conventions.
Why use it?
It gives the project’s required commands and test-writing rules, reducing uncertainty about where tests belong and how they should be written.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is K9i-0/ccpocket's own configuration. It tells Claude Code how to work on ccpocket itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ccpocket configures →

About the project

CC Pocket is a mobile and desktop client for controlling Codex and Claude coding-agent sessions through a self-hosted Bridge Server running on another computer. It lets users start sessions, approve actions, answer questions, review changes, and continue coding from supported devices. The catalogue entries provide the skills, hooks, MCP servers, agents, instructions, and settings used by this client.

K9i-0/ccpocket · 1,063 stars · on GitHub · k9i-0.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to K9i-0/ccpocket. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/K9i-0/ccpocket/main/.claude/skills/test-bridge/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/K9i-0/ccpocket

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-bridge

README.md
[![agentmods](https://agentmods.dev/badge/skills/k9i-0/ccpocket/test-bridge.svg)](https://agentmods.dev/skills/k9i-0/ccpocket/test-bridge)
Your own site
<a href="https://agentmods.dev/skills/k9i-0/ccpocket/test-bridge"><img src="https://agentmods.dev/badge/skills/k9i-0/ccpocket/test-bridge.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00769
Opus 5 $0.00013 $0.00385
Sonnet 5 $0.00005 $0.00154
Haiku 4.5 $0.00003 $0.00077

Measured 6d ago against content hash 2bce004377a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test-bridge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/test-bridge/SKILL.md · 90 lines

What it actually says

Bridge Server テスト

実行手順

以下を順番に実行し、全てパスすることを確認する。

1. ユニットテスト

npm run test:bridge

特定ファイルのみ:

cd packages/bridge && npx vitest run src/<filename>.test.ts

ウォッチモード (開発中):

cd packages/bridge && npx vitest src/<filename>.test.ts

2. TypeScript 型チェック

npx tsc --noEmit -p packages/bridge/tsconfig.json

テストファイル (*.test.ts) と vitest.config.tstsconfig.json の exclude に入っているため、型チェック対象外。

3. カバレッジ (任意)

npm run test:bridge:coverage

テスト記述規約

ファイル配置・命名

  • テストファイルはソースと同じディレクトリに <module>.test.ts として配置
    • 例: src/parser.tssrc/parser.test.ts
  • vitest.config.ts の include パターン: src/**/*.test.ts

import

import { describe, it, expect } from "vitest";
  • vitest からのみ import する (jest の互換 API は使わない)
  • テスト対象モジュールは .js 拡張子で import する (NodeNext moduleResolution)
    • 例: import { parseRule } from "./claude-process.js";

テスト構造

describe("関数名 or クラス名", () => {
  it("動作の説明 (英語)", () => {
    expect(actual).toBe(expected);
  });
});
  • describe でテスト対象の関数/クラス単位にグルーピング
  • it の説明は英語で、三人称現在形 ("returns null for empty string")
  • 1つの it で1つの振る舞いを検証する

テスト対象の方針

  • 純粋関数・ロジック中心にテストする (高ROI)
  • プロセスspawn, ファイルシステム, WebSocket等の外部依存は対象外
  • 現在テスト対象のモジュール:
    • parser.ts — parseClaudeEvent, claudeEventToServerMessage, parseClientMessage, normalizeToolResultContent
    • claude-process.ts — parseRule, matchesSessionRule, buildSessionRule, toolNeedsApproval, ACCEPT_EDITS_AUTO_APPROVE
    • image-store.ts — ImageStore.extractImagePaths

新しいテスト追加時

  1. export されている純粋関数があればテスト追加を検討
  2. internal関数をテストしたい場合は export に変更する (テスト可能性のための export は OK)
  3. テスト追加後は型チェックが通ること (npx tsc --noEmit) も確認
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 90 lines · 25 tokens per session scan A 2bce004377a7

Subscribe to this mod's changes

test-bridge is a skill published in the GitHub repository K9i-0/ccpocket (1,063 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 769 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.