skills/analyze-project/SKILL.md
Use when starting work on any project to produce or update living documentation (TechStack.md, ProjectStructure.md) that bootstraps context for any AI agent session. Run before any feature work, or periodically to keep docs current.
npx skillsauth add olamedia/analytics-skills analyze-projectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scan a project and produce or update docs/TechStack.md and docs/ProjectStructure.md — living documentation that any AI agent session can read to instantly understand the project without re-scanning from scratch.
When NOT to use: docs/TechStack.md and docs/ProjectStructure.md exist and no significant structural changes (config files, directories, container configs) have occurred since the last scan.
docs/TechStack.md — concise tech stack reference carddocs/ProjectStructure.md — operational project map[service-path]/docs/Check if docs/TechStack.md and docs/ProjectStructure.md exist at the project root.
If they exist, read them and extract the YAML frontmatter:
---
generated-by: analyze-project
date: 2024-03-14T12:00:00Z
commit: abc1234
---
If the files exist, hold their contents — you'll compare against fresh scan results later.
Run git rev-parse --short HEAD to get the current commit hash.
If the commit field in frontmatter differs from HEAD (it usually will — it records the commit at last scan, not the latest), check what actually changed:
Run git diff --name-only <frontmatter-commit>..HEAD to get committed changes, and git status --short to get uncommitted changes (staged, unstaged, and untracked files). Combine both lists.
Evaluate whether the changes are significant for project docs:
package.json, composer.json, docker-compose.yml, Dockerfile, Makefile, *.config.*, etc.), new/removed top-level directories, changes to .devcontainer/, CI config changes, README/INSTALL/SETUP changesDecision:
If git is not available, skip this check and always proceed to scan.
For each existing file, check the generated-by field in YAML frontmatter:
generated-by: analyze-project present → Skill owns this file. Will update without asking.generated-by: analyze-project → Manually authored. Ask the user before overwriting:"
docs/TechStack.mdexists but wasn't generated by this skill. Overwrite it? (yes/no)"
If user declines, skip that file and report findings in chat instead.
List the project root directory. Read relevant files found:
Config files (reveal tech stack):
package.json, composer.json, Cargo.toml, go.mod, pyproject.toml, Gemfile, build.gradle, pom.xml, etc.tsconfig.json, vite.config.*, webpack.config.*, nuxt.config.*, etc.Container and dev environment:
docker-compose.yml / docker-compose.yamlDockerfile.devcontainer/devcontainer.jsonCI/CD:
.github/workflows/*.yml.gitlab-ci.ymlJenkinsfileDocumentation:
README.mdINSTALL.md, SETUP.mdQuality tooling:
Makefile.eslintrc.*, eslint.config.*.prettierrcphpunit.xml, vitest.config.*, jest.config.*, pytest.iniStart from the root listing. If root has enough config files, that's all you need. If root contains only a single folder (e.g., the repo wraps one project in a subdirectory), treat that folder as the effective root and list it instead. If root is unclear, run a quick glob for config files (**/{*.yml,*.yaml,*.json,*.toml,*.ini,*.md}) limited to a small number of results — the paths reveal where projects and services live (e.g., services/api/package.json). Then read those directories. Avoid full recursive filesystem scans.
Check for monorepo signals from what was found in Step 4:
apps/, services/, packages/ at rootdocker-compose.yml defining multiple services with build contextspackage.json (workspaces field) or pnpm-workspace.yamlDockerfile references in different subdirectoriesIf monorepo detected, identify service directories and their names.
For each service directory identified in Step 5, apply the same root-reading approach:
Use the templates from references/formats.md.
Single project:
docs/TechStack.md with tech stack reference carddocs/ProjectStructure.md with operational project mapProjectStructure.md ends with a "See Also" link to DatabaseStructure.mdMonorepo:
docs/TechStack.md with shared stack + per-service summarydocs/ProjectStructure.md with service table and monorepo-level overview[service-path]/docs/TechStack.md and [service-path]/docs/ProjectStructure.mddocs/ directories if they don't existAll files get YAML frontmatter with:
generated-by: analyze-projectdate: current ISO 8601 datetimecommit: current short git commit hashAnnounce the saved paths:
"Project docs updated:
docs/TechStack.mddocs/ProjectStructure.md[per-service paths if monorepo] Commit: [hash]"
| Rationalization | Reality | |---|---| | "The README has all this info" | READMEs describe intent and setup steps. TechStack and ProjectStructure describe current reality in a structured, machine-readable format. | | "I can just read package.json" | One config file gives you one piece. These docs synthesize all signals into two quick-read files. | | "The project is small, I don't need docs" | Small projects still have a stack, structure, and tooling. Two short files save every future session from re-discovering them. | | "Docs will get outdated" | The staleness gate and commit tracking exist specifically to prevent this. Run the skill again. |
docs/ directory before writingBefore finishing, confirm:
docs/TechStack.md written with frontmatter and concise stack listingdocs/ProjectStructure.md written with frontmatter and operational mapProjectStructure.md ends with reference to DatabaseStructure.mdgenerated-by, date, and commit in frontmattertesting
Rebase current feature branch onto master (or configured base) with automated conflict resolution. Handles pre-checks, conflict classification, and post-rebase verification. Use when the user asks to rebase, update a branch, sync with master, or resolve rebase conflicts.
development
FE feature analysis from raw idea (or YouTrack ticket) through to a split-aware developer briefs. Produces context-map.md, requirements.md, task-brief-{side}.md. Generic — project knowledge is auto-discovered.
testing
Concise technical communication that stays readable and honest. Cuts fluff about fifty to seventy percent while keeping natural flow, uncertainty markers, and human tone. Levels lite (default), mid, tight. Short SKILL body; rules below are complete.
documentation
Strip LLM tells from text so it reads human. Triggers: humanize, sounds like AI, too robotic, natural rewrite, AI slop, or obvious LLM patterns. Reference: https://en.wikipedia.org/wiki/WP:Signs_of_AI_writing