agentleFS
yagompyagomp/seoagent/AGENTS.md

seoagent

AGENTS.md0 starsChanged 8 months agoMITView on GitHub

This file provides instructions for AI coding agents (Claude Code, Codex, Gemini, Cursor, etc.) working on the SEOAgent codebase. 24 tools prefixed seoagent_. Install config: Global --format flag: table (default), json, markdown.

  • Reads credentials
  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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.

  • In this repository5 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 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.

  • 5

    Very specific

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

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

    Add types to packages/core/src/types.ts (if needed)

    line 27
  2. Very specific:

    Write failing test in packages/core/src/__tests__/

    line 28
  3. Very specific:

    Add CLI command in packages/cli/src/commands/

    line 31
  4. Very specific:

    Add MCP tool in packages/mcp/src/tools/

    line 32
  5. Distinctive:

    Add dashboard endpoint + page if applicable

    line 33
  6. Very specific:

    Use SEOAGENT_HOME env var pointing to temp dir for isolated tests

    line 39

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

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

SEOAgent — Agent Instructions

This file provides instructions for AI coding agents (Claude Code, Codex, Gemini, Cursor, etc.) working on the SEOAgent codebase.

Quick Start

pnpm install && pnpm build && pnpm test

Where Things Live

WhatWhere
All business logicpackages/core/src/
Public APIpackages/core/src/index.ts (barrel export)
Typespackages/core/src/types.ts
Database schemapackages/core/src/schema.ts
Testspackages/core/src/__tests__/*.test.ts
CLI commandspackages/cli/src/commands/
MCP tool handlerspackages/mcp/src/tools/
Dashboard APIpackages/dashboard/src/server/routes.ts
Dashboard pagespackages/dashboard/src/app/pages/

Adding a New Feature

  1. Add types to packages/core/src/types.ts (if needed)
  2. Write failing test in packages/core/src/__tests__/
  3. Implement in packages/core/src/ (new file or existing module)
  4. Export from packages/core/src/index.ts
  5. Add CLI command in packages/cli/src/commands/
  6. Add MCP tool in packages/mcp/src/tools/
  7. Add dashboard endpoint + page if applicable

Testing Patterns

  • Mock HTTP calls with vitest.mock("undici") or vitest.mock("googleapis")
  • Mock DataForSEO with vitest.mock("../dataforseo.js")
  • Use SEOAGENT_HOME env var pointing to temp dir for isolated tests
  • Database tests: create temp dir, openDatabase(), cleanup in afterEach
let tmpDir: string;
beforeEach(() => {
  tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "seoagent-test-"));
  process.env.SEOAGENT_HOME = tmpDir;
});
afterEach(() => {
  fs.rmSync(tmpDir, { recursive: true, force: true });
});

MCP Server

24 tools prefixed seoagent_. Install config:

{
  "mcpServers": {
    "seoagent": {
      "command": "node",
      "args": ["<absolute-path>/packages/mcp/dist/index.js"],
      "env": { "SEOAGENT_PROJECT": "<project-slug>" }
    }
  }
}

CLI

seoagent project add mysite --domain example.com --niche tech
seoagent project use mysite
seoagent config set dataforseo.login <login>
seoagent config set dataforseo.password <password>
seoagent keywords research "seo tips" --format json
seoagent audit crawl --max-pages 100
seoagent strategy generate

Global --format flag: table (default), json, markdown.

Core Function Groups

Project Management

addProject, listProjects, getProject, removeProject, setActiveProject, getActiveProject

Config

loadConfig, saveConfig, setConfigValue, getConfigValue

Database

openDatabase(dbPath), closeDatabase(db) — creates all 9 tables via schema.ts

Site Audit

auditCrawl(domain, db, options?), auditReport(db), auditPage(url, db)

Keywords & Rank Tracking

keywordResearch(db, provider, keywords, locale), keywordSuggestions(db, provider, seed, locale, limit?) rankTrackAdd(db, keywords, locale), rankTrackCheck(db, provider, domain, locale), rankTrackHistory(db, keyword, locale), rankTrackReport(db, locale)

Competitors

competitorKeywords(provider, domain, locale), competitorCompare(provider, yourDomain, competitor, locale), contentGaps(db, provider, yourDomain, competitors), contentGapsForProject(provider, slug)

Domain Reputation

domainReputation(domain, db, credentials), domainReputationHistory(db, options?), backlinkProfile(domain, db, credentials), backlinkOpportunities(domain, competitors, credentials)

Google Search Console

generateAuthUrl(clientId, secret), gscPerformance(slug, options?), gscPages(slug, options?), gscQueries(slug, options?)

Strategy Engine

strategyGenerate(db, project), strategyRefresh(db, project), generateRuleBasedStrategy(data) (fallback without LLM)

Provider

createProvider(login, password) — creates DataForSEO provider implementing SearchDataProvider interface

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.