Install
$ agentstack add skill-by-sonic-skill-compass-skill-compass ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
skill-compass
UserPromptSubmit + PostToolUse hooks for Claude Code. They route to the right skills/agents from three signals: the working directory's composition (languages, frameworks, config files), project/topic keywords in your prompt, and keywords the AI surfaces mid-turn (a Bash/Grep/Glob/Read/Task result). E.g. UI files → frontend-design, API routes → api-design, a Dockerfile → infra, "find the clickhouse migration" → the database skills. It nudges the model toward the right skill instead of relying on memory.
Layout (this repo)
Run paths are relative to the repo root (the parent of skill/):
compass.js— the hook engine (handles both events). Flags:--self-test,--force,--post(PostToolUse mode). Disable per-session with envSKILL_COMPASS=off.directions.json— the routing table: maps detected stacks/files → suggested directions. This is the file users edit.install.js— installer. Copiescompass.js+directions.jsoninto~/.claude/skill-compass/and registers both theUserPromptSubmitandPostToolUsehooks in~/.claude/settings.json. Idempotent.--uninstallremoves both hooks.
After install the live copy runs from ~/.claude/skill-compass/, so edits to the installed directions.json survive re-installs (the installer keeps an existing one).
Tasks
Install / enable the hook
Run from the repo root:
node install.js
It copies files, registers the hook, and prints the test command. Tell the user to restart Claude Code afterward — the hook is loaded at process start. If they re-run it, it's a no-op (idempotent), which is the expected, safe outcome.
Uninstall / disable
- Permanent removal:
node install.js --uninstall(strips the hook fromsettings.json, leaves files in place). - Temporary, one session: set
SKILL_COMPASS=offin the environment before launching Claude Code.
Inspect or edit routing rules
directions.json is the source of truth for what gets suggested. To see current rules, read it. To change behavior, edit it directly. After editing the installed copy at ~/.claude/skill-compass/directions.json, no reinstall is needed — the running hook reads it fresh.
When adding a new stack→direction mapping, match the existing entries' shape (a detector for the stack and the direction text it emits). After any edit, always run the self-test below to confirm nothing broke.
Run the self-test
This is the verification step before claiming any change works:
node compass.js --self-test
It exercises stack detection, direction routing, and the empty-project guard, then prints ALL PASSED (non-zero exit on failure). If a user reports the hook mis-suggesting, reproduce by adding or adjusting a case here first — a failing self-test case localizes the bug before you touch the engine.
Debug "it's not suggesting anything"
Walk these in order:
- Hooks registered? Check
~/.claude/settings.json→hooks.UserPromptSubmitandhooks.PostToolUseeach contain a command withskill-compass(the PostToolUse one ends with--post). - Disabled? Check the
SKILL_COMPASSenv var isn'toff. - Restarted? Hooks only load at Claude Code startup.
- Empty/at-root project? With no stack manifest, no prompt keyword and no mid-turn tool finding, the engine intentionally stays silent (junk-drawer guard) —
cdinto a real project, mention a project/topic keyword, or pass--force.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: by-sonic
- Source: by-sonic/skill-compass
- License: MIT
- Homepage: https://by-sonic.github.io/skill-compass/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.