agentleFS
zeljkoobrenoviczeljkoobrenovic/sokrates-skills/skills/sokrates/SKILL.md

sokrates

Skill3 starsChanged 31 days agoMITView on GitHub

Start here for anything about Sokrates (sokrates.dev), the source-code analysis tool: analyze a repository, understand a codebase, set up or improve the Sokrates config, scan for risks, build a landscape of many repositories, improve code where it matters. Finds out where the user is and routes to the right sokrates-skill, running Sokrates when that is the next step.

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user named what they want, start from that and use the situation only to check the prerequisites - "scan this repo" with no …

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Sokrates (start here)

Sokrates measures a codebase - size, complexity, duplication, churn, coupling, contributors - and writes one analysis per repository (_sokrates/) or one landscape over many (_sokrates_landscape/). The other sokrates-skills configure it, add AI findings on top of its data, and act on what it found. This skill decides which of them applies now. Do not guess the situation: measure it.

1. Find out where you are

python3 <this-skill-path>/scripts/situation.py [folder] [--json <scratch>/situation.json]

It prints the situation (repository or landscape, analysis present and how old, configuration tuned or not, AI findings, how Sokrates can be run on this machine) and ranked next steps, each naming the skill or command. Trust the order: a step only makes sense once the ones before it are done - findings built on an untuned configuration describe the wrong scope, an improvement measured on a stale analysis proves nothing.

2. Act on the first applicable step

the script saysdo
[install]Sokrates is not on this machine. Tell the user the options (Docker image ghcr.io/zeljkoobrenovic/sokrates, the CLI jar) and stop; do not substitute your own analysis.
[analyze]Run the printed command in the repository root (it includes git history extraction, init when there is no configuration, and the reports). Then re-run situation.py.
[sokrates-repo-config] [sokrates-decompositions] [sokrates-features-of-interest] [sokrates-people-config]Load that skill and follow it. Every change to config.json is followed by sokrates analyze (or generateReports), so the data the next steps read is current.
[full-scan]Load full-scan; it chooses the bundle (basic, a deep-dive family, or full) from what the user asked. A named worry ("is it secure", "well tested") goes straight to that scanner family.
[sokrates-scan-core]Findings without an explorer page: run the printed render_findings.py.
[sokrates-improve]Load sokrates-improve; it selects a target from the data, changes the code on a branch and proves the effect by re-measuring.
[analyzeLandscape] [sokrates-landscape-config] [sokrates-virtual-landscapes]Landscape work: run the printed command, then the landscape skills.

When the user named what they want, start from that and use the situation only to check the prerequisites - "scan this repo" with no analysis means: analyze first, say so, then scan.

3. Running Sokrates

situation.py prints the form that works here, in this preference: sokrates on the PATH, the jar from SOKRATES_JAR, or Docker (docker run --rm -v "$(pwd):/code" ghcr.io/zeljkoobrenovic/sokrates <command>). The commands that matter:

commanddoes
analyzeone repository, in place: git history, configuration if missing, reports under _sokrates/
analyzeGitRepo -url <git url>clone, analyze, keep only the analysis under <owner>/<repo>/
analyzeLandscape [-urls repos.txt]analyze every listed repository, then the landscape over all analyses under the root
analyzeGitHubOrg -org <login> / analyzeGitLabGroup -group <path>a whole organization, one landscape per org
-dataOnlyonly the data.zip - enough for every skill, much faster, no HTML
-ai claude|codex|geminirun the agent with the skills after each analysis (incremental, -aiMaxRepos, -aiForce)

Builds differ: older ones lack -dataOnly, -ai, -prune, the organization commands, or match scope patterns against the whole path. Do not guess from dates — probe:

python3 <this-skill-path>/scripts/capabilities.py [--data _sokrates/reports/data/data.zip] [--json <scratch>/capabilities.json]

It runs the detected CLI, parses its usage into commands and options, says which capabilities the installed build has and lacks (and which jar a sokrates wrapper runs), and with --data which exports an analysis holds (history zip, units, duplicates, temporal dependencies, …). When a capability is missing, say so and use the older form (extractGitHistory + init + generateReports instead of analyze, a full run instead of -dataOnly) rather than failing on an unknown flag.

4. Which skill when (the map)

you wantskill
the configuration right: scope, file classes, thresholdssokrates-repo-config
meaningful componentssokrates-decompositions
debt markers, security-sensitive code, integrations, feature flags trackedsokrates-features-of-interest
one person = one contributorsokrates-people-config
what this codebase is, does, how it is builtfull-scan (basic)
how good it is at testing, reliability, maintainability, riskfull-scan family quality
performance, storage, network, observabilityfull-scan family runtime
security, infrastructure, configurationfull-scan family security
the findings format, validation, explorer, merge, diff, re-check, summarysokrates-scan-core
make the code better where the numbers say so, and prove itsokrates-improve
a landscape: what gets aggregated, tags, teamssokrates-landscape-config
sub-landscapes by naming, technology, team, activitysokrates-virtual-landscapes
the portfolio story over a scanned landscape: concentration, recurring findings, coverage, prioritieslandscape-synthesis-scan

A named worry goes straight to its scanner (each writes validated findings; full-scan runs bundles of them):

the questionscanner
what does this software do, for whom, through which entry pointsfunctionality-scan
what do the domain concepts mean, where does the language driftdomain-language-scan
how is it structured, what depends on what, is the architecture erodingarchitecture-scan
how did it get here, what is the trajectoryevolution-scan
which languages, frameworks, libraries, build and infra toolingtech-stack-scan
how is it built, tested, released, deployedcicd-scan
what runtime environment does it declare: Terraform, Kubernetes, Dockerfilesiac-scan
how is it configured, where do settings and secrets come fromconfiguration-scan
how well is it tested, what is untestedtesting-scan
what does it log, measure, trace; what stays darkobservability-scan
what happens when things fail: errors, retries, isolationreliability-scan
where will it be slow, what scales badlyperformance-scan
where does the data live, how is it versioned and kept intactstorage-scan
what does it connect to and listen on, what happens offlinenetwork-scan
is it secure: identity, secrets, injection, crypto, trustsecurity-scan
how maintainable, graded per sub-characteristic and componentmaintainability-scan
which files are risky and why, bus factor, change couplingrisk-synthesis-scan

5. Rules shared by every skill

  • Numbers come from the Sokrates data (_sokrates/reports/data/data.zip), never from reading the tree and estimating. Findings cite file, line and verbatim snippet and are validated before they are reported.
  • Reports are generated artefacts: edit config.json, never a file under reports/.
  • Say what was done and what was skipped. A scan that did not validate, an improvement that did not move the numbers, an analysis that could not run: report it as such.

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.

Reviews can't be read right now.

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.