sokrates-repo-config

Creates and validates Sokrates config.json files for repository source-code analysis.

3|1|Updated Aug 26, 2026
One-click install
npx skills add https://github.com/zeljkoobrenovic/sokrates-skills --skill sokrates-repo-config-zeljkoobrenovic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sokrates-repo-config
Source: https://github.com/zeljkoobrenovic/sokrates-skills/tree/main/skills/config/sokrates-repo-config
Command: npx skills add https://github.com/zeljkoobrenovic/sokrates-skills --skill sokrates-repo-config-zeljkoobrenovic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Sokrates' init command generates a workable _sokrates/config.json, but it cannot know which files are real source versus vendored, generated, or test code, how the system should be decomposed into components, or which cross-cutting concerns matter. Misconfigured scope and decomposition silently corrupt every metric in every report, and malformed regexes fail invisibly because Sokrates treats them as matching nothing. ## Core Features & Use Cases - Config creation and tuning: Sets source scope (srcRoot, extensions, ignore rules), classifies files into main/test/generated/build/other scopes with correct precedence, and designs logical decompositions via folder depth, explicit components, or meta rules. - Preview simulation script: Runs scripts/preview_config.py to apply Sokrates' own scoping rules to the real tree before analysis, reporting excluded files, scope sizes, component LOC shares, concern hits, and linting dead rules and non-compiling regexes. - Field reference: references/config-reference.md documents every config key read from the Sokrates Java source, including gotchas the official docs get wrong (e.g. trendAnalysis and maxFileSize do not exist). - Use Case: A team sets up Sokrates across 30 repositories; the skill writes a shared analysis_conventions.json, runs init -conventionsFile per repo, and verifies one representative repo with the preview script before rollout. ## Quick Start Ask the AI to set up or fix the Sokrates configuration for your repository and preview what the config will include and exclude before running the analysis.

Frequently Asked Questions about sokrates-repo-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Sokrates to exclude generated or vendored code?

Add path filters to the `generated` scope or `ignore` list in `_sokrates/config.json`, preferring classification over ignoring so files still count in the inventory. Patterns must match the entire path including the srcRoot prefix, so start them with `.*`.

How do I split a Sokrates analysis into meaningful components?

Adjust `componentsFolderDepth` in `logicalDecompositions`, define explicit `components` with sourceFileFilters, or use metaComponents rules. The preview script shows each component's LOC share and flags single dominant components or files matching several components.

Why are files missing from my Sokrates report?

Files are dropped when their extension is not in `extensions`, they exceed size limits (maxFileSizeBytes, maxLines, maxLineLength), or an `ignore` filter matches. Run the preview script to see exactly which rule excluded each file.

Why does my Sokrates config regex not match anything?

Sokrates silently treats a malformed regex as matching nothing, with no error. Path patterns must also match the entire path and content patterns an entire line. The preview script compile-checks every regex and reports failures as errors.

Can I reuse one Sokrates configuration across many repositories?

Yes. Write an `analysis_conventions.json` with shared ignore, test, generated rules, bots, thresholds, and componentsFolderDepth, then run `sokrates init -conventionsFile <file>` per repository. Verify one representative repository with the preview script first.

Does Sokrates config support git history and contributor settings?

Yes, via `fileHistoryAnalysis`: bots regexes, ignoreContributors, transformContributorEmails for identity normalization, and coAuthors for trailer-based co-author and AI-agent attribution. History requires running `sokrates extractGitHistory` to produce git-history.txt.