SeniorMode
Local read-only MCP server for engineering decision guides, standards, checklists, and Build and Audit workflows for coding agents. Runs over stdio.
Documentation
SeniorMode
English · Türkçe · Deutsch · Español · Français · 日本語 · Português (Brasil) · 简体中文 · العربية · Azərbaycanca · فارسی · हिन्दी · Bahasa Indonesia · Italiano · Қазақша · 한국어 · Кыргызча · Русский · ไทย · Türkmençe · Татарча · ئۇيغۇرچە · Українська · Oʻzbekcha · Tiếng Việt · 繁體中文 · + Add your language
Your AI can code. Now make it engineer.
Real-world engineering knowledge for AI coding agents.
Install ·
Usage ·
Examples ·
Skill Directory ·
FAQ · Releases ·
Contributing
Made in Türkiye 🇹🇷
Working code is not enough. SeniorMode gives your coding agent a library of engineering decisions and a workflow for applying them. It helps the agent spot risks, choose an approach that fits your project, and test the result.
Start with the result you want. SeniorMode helps your agent turn an ordinary request into decisions that fit your project, protect what matters, and can be verified. The knowledge stays available locally for you and your agent to inspect.
103 Engineering Decisions · 13 Categories · 16 Engineering standards · 5 Supported agents
Why does shuffle feel broken?
Add shuffle to my music app.
| Method | Artist order | Adjacent repeats |
|---|---|---|
| Random sort | Eminem → Eminem → The Weeknd → The Weeknd → Drake → Drake | 3 |
| Fisher–Yates | The Weeknd → Eminem → Drake → Drake → The Weeknd → Eminem | 1 |
| Artist-aware | The Weeknd → Eminem → Drake → The Weeknd → Eminem → Drake | 0 |
Three shuffles of the same six songs show why random playback can still feel repetitive. Every song stays in the queue, and tracks by the same artist are spaced out when the playlist allows. Music shuffle
Install
Install with AI
Give this prompt to your coding agent, or choose your agent below for the terminal command.
Install SeniorMode from https://github.com/EnesKeremAYDIN/SeniorMode. Follow the installation instructions for my coding agent and current project. Check the target directory before writing, preserve my settings and any existing skill edits, and verify that the skill is available. Ask before overwriting an existing copy. Leave MCP setup for a separate request.
Supported agents
Install SeniorMode in any of these five agents. You can also use MCP from a compatible client. MCP
From your project root, run the command for your agent. The Vercel installer requires Node.js 22.20+.
Check the target folder and review any local edits before running an installer.
Vercel skills and the SeniorMode CLI each track the copies they install. Update or remove a copy with the tool that installed it. For manual copies, review local edits before replacing or removing the folder.
Codex ·
Claude Code ·
Gemini CLI ·
Codex
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent codex --copy -y
Claude Code
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent claude-code --copy -y
Cursor
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent cursor --copy -y
Gemini CLI
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent gemini-cli --copy -y
OpenCode
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent opencode --copy -y
Restart the agent session and ask for the change in your own words. Mention SeniorMode if the host does not select the skill. In Codex, $seniormode is the explicit skill reference. Bundled records work without an MCP server.
Project and global scope
The recommended installer uses project scope by default. Its optional global flag changes the home-level location. The managed SeniorMode CLI writes into an existing project only. Append seniormode to each skills path below. Tilde means your home directory. skills 1.9.0
| Agent | Manual / SeniorMode project path | Vercel skills project path | Vercel skills global path |
|---|---|---|---|
| Codex | .agents/skills | .agents/skills | ~/.agents/skills |
| Claude Code | .claude/skills | .claude/skills | ~/.claude/skills or CLAUDE_CONFIG_DIR/skills |
| Cursor | .agents/skills | .agents/skills | ~/.agents/skills |
| Gemini CLI | .gemini/skills | .agents/skills | ~/.agents/skills |
| OpenCode | .agents/skills | .agents/skills | ~/.agents/skills |
Vercel skills records project installations in skills-lock.json and global installations in .skill-lock.json. Use --project for project updates and --global for global operations. The installer can change the selected skill folder and lock file.
npx skills@1.9.0 list --agent codex
npx skills@1.9.0 check
npx skills@1.9.0 update seniormode --project
npx skills@1.9.0 remove seniormode --agent codex
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent codex --global --copy -y
Manual installation
Copy the entire skills/seniormode directory from a trusted checkout into the host’s skills directory. Retain SKILL.md, references, and licenses together. To refresh or remove your manual copy, replace or delete only that folder after reviewing any local edits.
CLI-managed installation
With dependencies installed in a SeniorMode checkout, run these actions individually against an existing project. The runtime requires Node.js 22.13.0+.
npm ci
node bin/seniormode.js install --agent codex --project "/path/to/project"
node bin/seniormode.js status --agent codex --project "/path/to/project"
node bin/seniormode.js update --agent codex --project "/path/to/project"
node bin/seniormode.js uninstall --agent codex --project "/path/to/project"
The managed CLI checks that it owns the installed files and that they are unmodified before updating or removing them. It limits changes to the managed skill and its installation records. Configure MCP in your agent if you need it.
CLI & MCP
The optional CLI searches local records. MCP also gives your agent access to the standards and workflows. SeniorMode runs locally without an API key. Your agent may require its own account.
Agent Skill
- Codex · Select
$seniormodein the prompt. - Claude Code · Select
/seniormodeor name SeniorMode in the request. - Cursor · Select the skill with
/in Agent chat. Cursor also finds project skills under.cursor/skills. - Gemini CLI · Use
/skills listto check discovery, then request SeniorMode by name. - OpenCode · Request
seniormodeby name. Useopencode debug skillwhen your OpenCode version provides it.
CLI
In the source checkout, install dependencies with npm ci. The CLI can search or open a record. Run node bin/seniormode.js --help for the full command list.
node bin/seniormode.js search "same payment charged twice"
node bin/seniormode.js show payment-idempotency
MCP
Configure your agent to run Node with the absolute path to the CLI and the mcp argument. JSON paths on Windows can use forward slashes. The server provides seven read-only tools over stdio. It shares records, standards and workflows with the installed Skill.
| Tool | Input | Result |
|---|---|---|
search_patterns | query, category?, limit? | Ranked matching records |
get_pattern | id | Record, options, checks and sources |
compare_approaches | id | Decision rules and trade-offs |
get_checklist | id | Verification checklist |
list_standards | — | Standard IDs and when to use them |
get_standard | id | One complete standard |
get_workflow | build, audit, principles | Build, Audit or operating principles |
Codex
codex mcp add seniormode -- node "/absolute/path/to/SeniorMode/bin/seniormode.js" mcp
Restart Codex. Remove the registration with codex mcp remove seniormode. Codex MCP
Claude Code
claude mcp add --transport stdio --scope local seniormode -- node "/absolute/path/to/SeniorMode/bin/seniormode.js" mcp
Check the registration with claude mcp list. Running Node directly works with this Windows setup. Claude Code MCP
Cursor · Gemini CLI
Merge this entry into mcpServers. Cursor uses .cursor/mcp.json and Gemini CLI uses .gemini/settings.json at project scope.
{
"mcpServers": {
"seniormode": {
"command": "node",
"args": [
"/absolute/path/to/SeniorMode/bin/seniormode.js",
"mcp"
]
}
}
}
OpenCode
Merge the local server into mcp in your OpenCode configuration.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"seniormode": {
"type": "local",
"command": [
"node",
"/absolute/path/to/SeniorMode/bin/seniormode.js",
"mcp"
],
"enabled": true
}
}
}
Troubleshooting
Check the project root, installation path, and Node.js version. Restart the session, then invoke SeniorMode by name if the agent has yet to discover it. For managed CLI errors, see the runtime guide. FAQ · CLI & MCP
How to use
New project
Use SeniorMode to build a music streaming app.
Describe what you want to build. Your agent picks a starting design, builds the first useful version, and checks how it works.
Existing project
Use SeniorMode to add shuffle to my music app.
Describe the change or the problem in your project. Your agent reads the existing code first. When you ask for an audit, it reports findings without editing files.
Audit an existing project
Use SeniorMode to find out why posts appear twice in my feed.
How it works
SeniorMode starts with your request and examines the project. It spots decisions you may not have known to ask about, checks which guidance fits, and explains how the result was verified.
- Request. “Checkout sometimes charges me twice when my connection drops.”
- Investigate. The payment can succeed before the reply reaches the customer.
- Choose a fix. Retrying with the same purchase ID lets the system recognize the original payment.
- Verify. The local example drops the first reply. The retry returns HTTP
200and the database contains 1 charge.
The Agent Skill routes work to Build, Audit and the relevant standards. The CLI and MCP use the same English records and in-memory SQLite search for English and Turkish queries. Managed installations copy the Skill into a chosen project. The catalog and README generators organize this material for agents and readers.
Payment retry · Skill Directory
Examples
Music shuffle ·
Last-room reservations ·
Payment retry ·
Repeated posts in a feed
Music shuffle
Add shuffle to my music app.
Every song stays in the queue, and tracks by the same artist are spaced out when the playlist allows. Run this example to see the song titles and the complete order for each method.
Code and verification
The runnable example shows all song titles. Sorting with random comparisons does not give each order equal odds. The tests check all six permutations of a three-item list, track preservation, and playlists where a dominant artist makes some repeats unavoidable.
node examples/shuffle.mjs
node --test test/shuffle.test.js
Last-room reservations
Build a reservation system for my small hotel.
Only one guest can book the last room, even when requests arrive together. The test sends two requests at the same time. One books the room. The other finds it taken.
Code and verification
Two database connections compete for the same room and night. One request returns 201, the other 409, and one booking is stored. This example covers immediate confirmation for one night.
node --test test/reservation.test.js
Payment retry
Build a checkout with payments.
Customers can retry after a lost response without getting charged twice. The test drops the first reply, retries the request, and confirms only one charge was recorded.
Code and verification
The test drops the first reply and retries from a separate connection. It checks one stored charge and a conflict when the same purchase ID is reused with a different amount. With a real provider, reconcile an unknown result according to its contract.
node --test test/payment-retry.test.js
Repeated posts in a feed
Some posts in this feed show up twice. Find out why.
New posts can arrive without making earlier posts show up twice in the feed. The example inserts a post between requests and shows two ways to continue the feed, including one that avoids repeating a post.
Code and verification
A new post arrives between page requests. Offset returns IDs 8, 6 and repeats item 8. The cursor continues from (9, 8) with 6, 99. The test covers this insertion and preserves the existing offset route.
node --test test/pagination.test.js
Skill Directory
Find the problem you’re facing below. Each entry links to an English guide with options, trade-offs, and ways to check the result.
103 Engineering Decisions · 13 Categories · 16 Engineering standards
Algorithms and data structures (8) ·
Architecture (8) ·
Backend and APIs (8) ·
Concurrency (9) ·
Data and storage (12) ·
Frontend (7) ·
Geospatial (5) ·
Networking (7) ·
Performance (6) ·
Product behavior (6) ·
Reliability (12) ·
Security (8) ·
Testing (7) ·
Engineering standards (16)
Algorithms and data structures (8)
- Binary search — How do you find a value or the right insertion point in an ordered list, even when values repeat?
- Bloom filters — How can you quickly rule out missing items before making an expensive lookup?
- Approximate event counts — How can you track the most frequent events with a fixed amount of memory?
- Choosing items under a limit — Which combination gives the best result when each item uses part of a fixed budget?
- Friend recommendations — How do you rank people by how many friends they actually share?
- Sliding-window distance — How do you find the best stretch of a fixed distance or within a fixed limit?
- Dependency ordering — How do you order dependent tasks and explain when their dependencies form a loop?
- Autocomplete — How can you suggest completions without searching every word after each keystroke?
Architecture (8)
- Batch or live processing — How soon does new data need to appear, and how will processing recover after a failure?
- Consistent hashing — How do you distribute work while moving as little data as possible when servers change?
- Testable business decisions — How do you test a rule without relying on the current time, a database, or an external service?
- Personalized feeds — How do you keep feeds fast when some people have many more followers than others?
- Modular monolith or separate services — When is a single deployable app enough, and when does a part need to run independently?
- Module boundaries — Where should business rules live so they are clear to change and test?
- Offline edit conflicts — How should changes sync when people edit the same data while offline?
- Transactional outbox — How do you make sure a saved change also generates an event after a crash?
Backend and APIs (8)
- API versioning — How do you evolve a public API while keeping existing clients working?
- Cursor pagination — How do you prevent skipped or repeated items when new results arrive between pages?
- Reliable scheduled jobs — What happens to scheduled work when the service goes offline and comes back?
- Duplicate event delivery — How do you prevent a repeated event from applying the same change twice?
- Message acknowledgments — How do you tell which messages got through after a disconnect or lost acknowledgment?
- Resumable uploads — How do you resume an interrupted upload and verify that the completed file is intact?
- Input validation — How do you catch invalid data before it changes state or reaches another system?
- Short links — How do you make short links unique and decide whether they can be guessable?
Concurrency (9)
- Safe file replacement — How can readers always see a complete file even if a write fails or overlaps another write?
- Concurrency limits — How do you stop fast producers from overwhelming a slower service?
- Event ordering — Which events must stay in order, and which can be processed in parallel?
- Expired worker leases — How do you stop a worker from writing after it loses its claim on the work?
- Collaborative text editing — How do two people edit the same text without silently overwriting each other?
- Conflicting saves — How do you detect that someone changed a record before a second edit is saved?
- Duplicate charges — How do you make sure retrying a payment never charges the customer twice?
- Double bookings — How do you keep a slot available to one customer while payment or confirmation is pending?
- High-traffic counters — How do you count many updates without everyone writing to the same place?
Data and storage (12)
- Cache freshness — When can you safely serve cached data, and how soon must changes appear?
- Indexes for actual queries — Which columns should an index include for the filters and sorting people use?
- Data retention and deletion — How do you delete a person's data from the main store and its other copies?
- Exact money amounts — How do you store and round money without accumulating calculation errors?
- SQLite or database server — When is a local database enough, and when do writers need a separate database service?
- Search index freshness — How do you monitor delayed search updates and rebuild the index when necessary?
- Full-text search — How do you find documents by words without rereading every document for each search?
- Cache eviction — Which entries should you keep when the cache runs out of space?
- Stored file lifecycle — How long should file versions stay recoverable before they are permanently removed?
- Seeing your own changes — How do you show someone a change they just saved when database copies are behind?
- Transaction isolation — How do you keep a rule across multiple records true when operations run at the same time?
- Database changes without downtime — How do you update your database while old and new app versions are both running?
Frontend (7)
- Keyboard accessibility — How can someone use the full interface with a keyboard and keep track of focus?
- First useful content — Which resources should load first so people can start using the page sooner?
- Form validation — How do you give immediate feedback while ensuring the server enforces the rules?
- Instant feedback for changes — How do you show a change immediately and correct the display if the server rejects it?
- Progressive enhancement — How do essential actions keep working on slow connections or when scripts fail?
- Outdated search responses — How do you stop a slow response from replacing results for a newer search?
- Tables on small screens — How do you make a dense table usable on a phone while preserving relationships between values?
Geospatial (5)
- Location privacy — How much location detail does the feature actually need to collect and retain?
- Coordinates and distances — How do you choose the right map coordinates and units for a distance calculation?
- Traffic estimates — How do you estimate slowdowns from noisy location samples without overstating certainty?
- Faster route lookups — When is it worth preparing the road network in advance for repeated route lookups?
- Finding nearby drivers — How do you narrow nearby drivers before checking availability and travel time?
Networking (7)
- DNS cutovers — How do you switch a service address when some visitors still have old DNS answers cached?
- HTTP cache checks — How can a browser check whether its saved response is still valid for the same request and user?
- Live streaming delay — How close to live can playback be while staying stable under normal network conditions?
- Request rate limits — How do you cap sustained traffic while allowing an occasional short burst?
- Response compression — When does compression help, and how do you keep different encodings apart in a cache?
- One-way live updates — How do you send progress updates and let a disconnected client catch up?
- Online presence — How do you keep presence accurate across disconnects, reconnects, and many users?
Performance (6)
- Large files with bounded memory — How do you transform a large input without holding it all in memory?
- Cache stampedes — How do you avoid many users triggering the same expensive refresh at once?
- Performance profiling — How do you find where time is spent before investing in an optimization?
- Repeated database queries — How do you avoid an extra database query for every item while keeping responses bounded?
- Queues and waiting times — How many workers do you need to keep wait times within an acceptable range?
- Virtual waiting rooms — How do you admit visitors fairly when more people arrive than the service can handle?
Product behavior (6)
- Preference and consent changes — How do you make a changed preference take effect across services that run at different times?
- Clear status for background work — How do you tell someone their request is accepted and still running without prompting a second submission?
- Gradual feature releases — How do you release a feature to a stable group first and turn it off safely if needed?
- Music shuffle — Should each shuffle be uniformly random, or should it also space out songs by the same artist?
- Resuming a playback queue — How do you remember the queue and playback position across restarts and playlist changes?
- Time zones and clock changes — Should a scheduled task follow local clock time or a fixed interval when clocks change?
Reliability (12)
- Circuit breakers — How do you stop repeated calls from making a struggling dependency worse?
- Failed message handling — How do you isolate messages that keep failing and retry them safely after fixing the cause?
- Disaster recovery — Can your backups restore the needed data and service within an acceptable time?
- Distributed tracing — How do you follow one slow or failed request across several services?
- Graceful shutdown — How do you stop accepting work and let active tasks finish or resume safely later?
- Request deadlines — How do you keep a single slow dependency from exhausting the time available for a request?
- Primary server failover — How do you switch to a replacement without letting two servers write as the primary?
- Health checks — How do you keep traffic away from unready instances without restarting healthy processes?
- Retries with backoff — How do you retry temporary failures without overwhelming the system or exceeding a deadline?
- Rolling deployments — How do two app versions share data safely during a deploy or rollback?
- Reliability targets — What reliability do users actually need, and when should repeated failures trigger an alert?
- Structured logs — How do you connect related errors without recording sensitive data or generating too much noise?
Security (8)
- Access to individual records — How do you check that a person can read or edit the specific record they requested?
- Browser content restrictions — How do you restrict what a page loads while allowing the resources it genuinely needs?
- Safe randomness — When do random values need to be impossible to guess, and when is a fair result enough?
- Cross-site request protection — How do you prevent another site from starting actions in a signed-in browser?
- Parameterized queries — How do you pass user input to the database as values instead of executable query text?
- Safe file uploads — How do you validate, store, and serve user uploads safely?
- Credential lifecycle — How do you store and rotate credentials without leaking them or interrupting service?
- Webhook verification — How do you verify that an event came from its claimed sender and handle repeat delivery?
Testing (7)
- API contract tests — How do you catch a provider change that would break a real client before deployment?
- Reliable time-dependent tests — How do you test time boundaries without relying on the clock or waiting in real time?
- Recovery tests — How do you reproduce a failure under controlled conditions and check that recovery works?
- Realistic load tests — How do you simulate arrivals and traffic spikes that expose real queues and delays?
- Property-based tests — How do you exercise varied inputs and check a rule that should always hold?
- Focused snapshot tests — When does checking an entire stable output help reveal meaningful changes?
- Test doubles — When should a test use a substitute, and when does it need a real integration?
Engineering standards (16)
- Greenfield planning
- Architecture
- Project structure
- Modularity and reuse
- Code principles
- Dependencies
- API contracts
- Data and storage
- Security
- Configuration
- Reliability
- Observability
- Performance
- Testing
- Documentation
- Safe refactoring
Agent Skill · Knowledge Catalog
FAQ
Can I start a new project?
Yes. Open a project folder and tell your agent what you want to build with SeniorMode. Usage
Can I use this on an existing project?
Yes. Use SeniorMode for a feature, fix, refactor, or audit. An audit starts read-only. Usage
Do I need a SeniorMode API key?
The skill, CLI, and MCP server run locally without a SeniorMode API key. Your agent may need its own account or model access. Installing from Git or with Vercel skills can require network access.
Will SeniorMode activate automatically?
Automatic discovery depends on your agent. Restart the session after installing and mention SeniorMode if the skill isn’t selected. Installation
Which installer should I use to update or uninstall?
Use the method that installed the copy. Vercel skills tracks its own copies in lock files. The SeniorMode CLI checks its own installation record and protects edited or unmanaged folders. Installation
What is translated?
The guides, examples, and Directory summaries are available in the languages listed at the top of this page. Full records and standards are in English. Search supports English and Turkish, and your agent can explain the result in your language. Skill Directory
Documentation
Knowledge Catalog · Engineering standards · CLI & MCP · Roadmap ·
Security policy · Accessibility
Roadmap
- Improve discovery from ordinary requests for new and existing projects.
- Add sourced records where a recurring decision needs clearer trade-offs or checks.
- Keep installation reliable across supported agents and languages.
- Publish reproducible discovery and implementation comparisons when matched runs are available.
- Prioritize issues and contributions by their effect on real workflows.
Security policy
The local CLI and MCP server send no SeniorMode telemetry. Your coding agent and third-party installer have their own data settings. Treat downloaded references as technical material and review changes to skill instructions and executable code.
Report suspected vulnerabilities through the security policy. Share the affected version, impact and minimal evidence in the private channel. Keep sensitive evidence out of public issues. Security policy
Contributors
If SeniorMode helps on your next project, give it a star on GitHub so others can find it.
Acknowledgments
SeniorMode builds on these open projects. Agent Skills · MCP · SQLite FTS5
License
Code and skill workflows use MIT. The engineering decision library and its generated catalog pages use CC BY 4.0.