agentleFS
fleslerflesler/scip-cli/scip_cli/SKILL.md

scip-cli

Skill4 starsChanged 20 days agoMITView on GitHub

Read when needing symbol lookup or SQL health dashboards in code.

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default --limit is 10 on query commands unless noted.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TypeScript/JavaScript, Python, Go, Rust — not GraphQL, CSS, or other files. Run from project root.

Contributors: pip install -e ".[dev]" so bare scip-cli on PATH is this checkout.

Quick guide

QuestionCommandOutput
Definition / bodycode XSnippet (default 80 lines/def; members Class for big types)
Usagesrefs Xfile:line refs
Symbols in filesymbols filestart-end kind name (bare filename ok)
Find by namesearch patternMatching symbols
Who imports this file?rdeps fileImporter paths
What does this use?deps targetOutbound deps (symbol or file)
Class membersmembers ClassMethods/fields + line ranges
Health / riskanalyzeSQL dashboard — project, dir, file, or symbol
Raw SQLquery "SELECT …"Rows from index.db (`--format tsvcsvjson`)

Default --limit is 10 on query commands unless noted. Stdout = records; stderr = warnings/progress. Pipe with --paths-only / --names-only.

Gotchas

  • Bare names — functions, types, classes. Members need qualifiers: code Widget.run, members pkg.MyClass. Consts/vars are not indexed — use rg. Class methods: members Class, not bare code method.
  • Ambiguity — code/refs return up to --limit matches; members/analyze pick first with stderr warning. Narrow with dotted names or query --path.
  • Stale index — run reindex after substantive edits (no auto-invalidation).
  • Query --path ≠ reindex scope — query --path filters results only. reindex --path / --tsconfig persist TS scope and replace cache; full reindex restores.
  • Monorepos — walks tsconfig*.json (skips node_modules, .git). Dedupes nested projects. Extra roots: .scip-cli.json (README). Query scope: --path packages/api.
  • allowJs — when tsconfig allowJs: true, matching .js/.jsx under include/files are indexed. No root tsconfig.json: --infer-tsconfig.
  • First run may auto-index (parallel by default, SCIP_CLI_INDEX_WORKERS). >10 tsconfigs log progress. Prerequisites: Node (TS/Python), Go, or Rust toolchain; scip converter auto-downloads. brew install scip is the wrong package.

Pipelines

GoalPipeline
Blast radiusscip-cli rdeps file.ts |xargs -I{} scip-cli symbols {}
Health briefingscip-cli analyze --limit 40 --per-check-limit 5
Importer filesscip-cli refs Foo --paths-only
Symbols in importersscip-cli refs Foo --paths-only |xargs -I{} scip-cli symbols {}
Classes → membersscip-cli search Handler --kind class --names-only |xargs -I{} scip-cli members {}
Members → defsscip-cli members Widget --names-only |xargs -I{} scip-cli code Widget.{}
Topic filesscip-cli search Dynamo --paths-only
Outbound filesscip-cli deps file.ts --paths-only

xargs reopens the index each call — cap fan-out with --limit on the first command.

Commands

code

code [--kind KIND] [--limit N] [--max-lines N] [--offset N] [--full] [--path PATH] [--snippet] [--line-numbers] <symbol> [...]

--kind: function, method, class, property. Multiple symbols: each block prefixed on stdout. --max-lines per body (default 80; also 32k char cap unless --full or --max-lines 0). --offset is body-relative. SCIP_CLI_MAX_DEF_LINES overrides cap.

refs

refs [--limit N] [--path PATH] [--paths-only] <symbol> [...]

file:line per ref (reads source for lines). Multi-symbol groups prefixed on stdout.

search

search [--kind KIND] [--limit N] [--path PATH] [--names-only] [--paths-only] <pattern> [...]

file:line kind name. Patterns OR'd. Filters noisy symbols.

symbols

symbols [--limit N] [--path PATH] <file>

rdeps

rdeps [--limit N] [--path PATH] <file>

Bare importer paths on stdout.

deps

deps [--limit N] [--path PATH] [--paths-only] <symbol|file>

Symbol: deps inside definition range. File: external symbols referenced. Format file:line symbol; --paths-only dedupes files.

members

members [--limit N] [--path PATH] [--names-only] <symbol>

start:end kind name. Prefix match under parent; missing ranges filled from source when needed.

query

query [--format tsv|csv|json] [--write] <sql> [...]

SQL against the cached project index.db. Read-only by default (PRAGMA query_only); --write allows mutations (commits after each statement). Default --format is tsv (header row + tab-separated values). csv and json (array of objects) are also supported. Prefer reindex over hand-editing the cache.

Introspect schema (SQLite catalog + PRAGMA):

query "SELECT name FROM sqlite_schema WHERE type='table' ORDER BY 1"
query "PRAGMA table_info(mentions)"
query "SELECT m.name AS table_name, p.name AS column_name, p.type FROM sqlite_schema m JOIN pragma_table_info(m.name) p WHERE m.type='table' AND m.name NOT LIKE 'sqlite_%' ORDER BY 1, p.cid"

analyze

analyze [--list-checks] [--limit N] [--per-check-limit N] [--path PATH] [--include-tests] [--priority LEVEL] [--check NAME] [target]

Check names: scip-cli analyze --list-checks (scope + one-line summary; no index required). Glue/slop pass:
scip-cli analyze --check dead_exports,dead_files,single_importer_files,one_line_exports --priority high,low --limit 40

Two “single place” checks: single_importer_files (project) = whole file has one inbound importer. single_use_imports (file target only) = import binding imported once in that file and used once repo-wide.

TargetScope
(omit)Project dashboards
directoryDir dashboards + per-file sections (indexed files under dir)
fileFile dashboards + top symbols by external consumers
symbolPressure, consumers, deps, affected

Priority high → medium → low. [high] cycles, dead exports, dead files, stale types (project unreferenced omitted when dead exports runs; file unreferenced omitted when dead-in-file runs). [medium] same-file-only, change surface (file). [low] single-importer files ([test-only] tag), test-only consumers, coupling, bottlenecks, hotspots, one_line_exports (tiny exported call-through functions — verify before inlining). --limit = total finding rows (default 20); headers/truncation don't count. --per-check-limit caps each section. Agents: --limit 40 --per-check-limit 5. --priority high or high,medium (1/2/3) skips lower tiers. --check NAME (repeatable/comma) ANDs with priority.

Easy wins: cycles, dead exports, dead files (production). Stale types = types with no external refs. Dead = no cross-file refs in index, not vulture. Shebang plus manifest entrypoints (package.json main/bin/scripts, dist→src mapping; each Python package for pyproject/setup/setup.cfg) are never project-level dead files/exports. single_importer_files rows with only test importers are tagged [test-only]. File-scoped analyze path/to/cli.ts still reports unused symbols in that file. Empty rdeps on a hit is often a SCIP miss — verify with rg -F STEM (basename in (...), same-file hits ignored).

reindex

reindex [--path DIR ...] [--tsconfig GLOB ...] [--exclude [GLOB ...]] [--fresh] [--no-incremental] [--unversioned] [--with-external]

--path and --tsconfig are TS-only and mutually exclusive. --tsconfig globs expanded in-tool; one heap per file by default (SCIP_CLI_TS_INDEX_BATCH_SIZE overrides). Scope/exclude persist in metadata.json.

--exclude GLOB drops matching docs post-convert (repeatable; merges .scip-cli.json excludeGlobs). Bare --exclude clears list; --exclude foo --exclude keeps foo. No / = basename; with / = repo-relative.

--fresh clears persisted metadata (unless combined with scope flags on same command).

Incremental by default in git TypeScript repos: reuses shards/manifest.json (git_commit + per-shard tsconfig_digest); skips clean shards. Dirty: git delta ∪ importer closure → fork --files → upsert live index.db; deletions remove documents. --no-incremental or --fresh forces full reindex and clears the manifest. Non-git, --unversioned, or non-TypeScript projects always full-reindex.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.