unbuilt.app
AGENTS.md95 starsChanged 9 months agoMITView on GitHub
Tech stack detection for websites via Playwright + pattern matching. Monorepo (yarn workspaces + turborepo): Example: adding a new state management library.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 76
Add to meta/index.ts with a Meta object:
- Distinctive: line 96
Update web app types (if applicable):
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md 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.
Files
AGENTS.md — unbuilt.app
Tech stack detection for websites via Playwright + pattern matching.
Project Structure
Monorepo (yarn workspaces + turborepo):
apps/cli/ — CLI tool (`unbuilt <url>`)
apps/web/ — Next.js web app (unbuilt.app)
packages/analyzer/ — Orchestrates detection: navigates page, runs all detectors, two-pass analysis
packages/features/ — Detection categories & patterns (this is where you add new detections)
packages/helpers/ — Shared utilities
packages/resources/— Resource tracking (scripts, stylesheets, etc.)How Detection Works
- Resources are collected from a live page (scripts, stylesheets, documents, headers, filenames)
- Patterns match against those resources using regex and browser checks
- Two-pass analysis: first pass detects everything independently, second pass runs
dependencieschecks so categories can reference each other's results - Each category returns:
{ name, confidence, detectedFeatures, secondaryMatches }
Pattern Interface
interface Pattern {
score: number; // Weight (0-1). Higher = stronger signal
name: string; // Identifier for this pattern
scripts?: RegExp[]; // Match against JS bundle contents
stylesheets?: RegExp[]; // Match against CSS contents
documents?: RegExp[]; // Match against HTML document
headers?: Record<string, RegExp>; // Match against HTTP headers
filenames?: RegExp[]; // Match against resource URLs
browser?: (page, browser) => boolean | Promise<boolean>; // Runtime check
dependencies?: (analysis) => boolean; // Cross-category dependency check (2nd pass)
}Key Types
Pattern—packages/features/src/types/pattern.tsFeatureResult—packages/features/src/types/feature.tsCalculationResult—packages/features/src/types/feature.tsAnalysisFeatures—packages/features/src/types/analysis.tsAnalyzeResult—packages/analyzer/src/types.ts
Adding a Pattern to an Existing Category
Example: adding a new state management library.
- Create
packages/features/src/categories/state-management/patterns/my-lib.ts:
export const myLib = [
{
name: 'coreBundle' as const,
score: 1,
scripts: [/my-lib-unique-marker/],
filenames: [/my-lib/],
},
{
name: 'apiUsage' as const,
score: 0.8,
scripts: [/useMyLib\s*\(/],
},
];- Add to
patterns/index.ts:
import { myLib } from './my-lib.js';
export const patterns = { ...existing, myLib } as const;- Add to
meta/index.tswith aMetaobject:
import { Meta } from '../../../types/meta.js';
// Add to meta object: myLib: { name: 'My Lib', website: '...', description: '...', Icon: null } satisfies MetaAdding a New Detection Category
- Create
packages/features/src/categories/my-category/with:patterns/— individual pattern files +index.tsmeta/index.ts— Meta objects for each patterndetect.ts— callsdetectFeature()with type keyindex.ts— re-exports detect, meta, patterns
- Register in:
packages/features/src/categories/index.ts—export * as myCategory from './my-category/index.js'packages/features/src/index.ts— export category + metapackages/features/src/types/analysis.ts— add toAnalysisFeaturespackages/analyzer/src/utils/analyze-feature.ts— import + add todetectionMap
- Update web app types (if applicable):
apps/web/src/app/utils/get-category-label.tsapps/web/src/app/utils/get-technology-meta.tsapps/web/src/server/utils/column-mapping.tsapps/web/src/server/utils/extract-secondary-matches.tsapps/web/src/server/utils/format-analyzis-response.ts
CLI Usage
# Basic analysis
yarn cli <url>
# JSON output
yarn cli <url> --json
# Agent-optimized compact output (for LLM context)
yarn cli <url> --format agent
# With local Chrome session for better accuracy
yarn cli <url> --sessionBuild & Test
yarn build # Build all packages
yarn test # Run tests
yarn lint # Lint + fixCategories
bundler, framework, uiLibrary, stateManagement, httpClient, router, translations, dates, stylingLibraries, stylingProcessor, transpiler, minifier, modules, monitoring, analytics, platform, tableLibrary, componentLibrary, animation, formLibrary, apiPattern
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
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.

