Borrowing it
Nothing to install: this file belongs to sagar-shirwalkar/servicenow-atlas. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sagar-shirwalkar/servicenow-atlas/main/.agents/skills/atlas-optimization-patterns/SKILL.mdgit clone --depth 1 https://github.com/sagar-shirwalkar/servicenow-atlasWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sagar-shirwalkar/servicenow-atlas/atlas-optimization-patterns)<a href="https://agentmods.dev/skills/sagar-shirwalkar/servicenow-atlas/atlas-optimization-patterns"><img src="https://agentmods.dev/badge/skills/sagar-shirwalkar/servicenow-atlas/atlas-optimization-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sagar-shirwalkar/servicenow-atlas/atlas-optimization-patterns"><img src="https://agentmods.dev/badge/skills/sagar-shirwalkar/servicenow-atlas/atlas-optimization-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.01146 |
| Opus 5 | $0.00036 | $0.00573 |
| Sonnet 5 | $0.00014 | $0.00229 |
| Haiku 4.5 | $0.00007 | $0.00115 |
Grade A, and why
atlas-optimization-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to use
- Adding a new dependency — always ask "can I do this with numpy/pyarrow?"
- Choosing a data structure for the chunks table
- Writing startup/import-heavy code
- Adding CPU-bound parallel work
- Any change to
atlas/source files
Principles
-
Zero new deps. Every library adds import time, CVE surface, and lockfile bloat. Prefer numpy + pyarrow (already installed) over anything new. Pandas is explicitly banned — see patterns below.
-
Optimize startup, not just hot path. A ~300 ms pandas import on every
atlas-*command hurts more than a 10 ms saving in a rarely-hit code path. -
DataFrame abstractions are overhead. The chunks table is read-only, loaded once, and accessed by column. Store columns as
numpy arraysfor masks andlist[str]for string data. Index by position, not by label. -
C-level string ops when possible. Use
pyarrow.compute(match_substring) instead of Python loops over 250k strings. Usepc.match_substring(arrow_array, token)— it's the same speed as pandasstr.contains. -
Process-level parallelism for CPU-bound ONNX. ONNX session.run is CPU-bound. Use
concurrent.futures.ProcessPoolExecutorwithmin(os.cpu_count(), 4)workers, each loading its own ONNX session. Only foronnx-cpubackend — MLX and CUDA are sequential. -
Lazy init for argparse and other I/O. Never call
parse_args()orread_parquet()at module level. Use the_get_args()/_bundle_cachedouble-checked locking pattern fromrag_server.py. -
Pre-compute at build time. Norms, manifest SHAs, anything that can be computed once and stored. Query time should be as close to a single matrix multiply as possible.
-
Single matrix multiply for cosine similarity. 250k × 768 dims:
(embeddings @ query).flatten() / norms. No FAISS, no Qdrant, no vector database. Numpy is sufficient and has zero infrastructure. -
Don't rebuild what's already built. The bundle is the slowest thing we produce (~15 min MLX, hours on CPU). Default to publishing the existing
./data/rag-bundle. Only rebuild when the docs source has changed. This is encoded inscripts/publish-bundle.sh.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 123 lines · 72 tokens per session scan A d90948122894
atlas-optimization-patterns is a skill published in the GitHub repository sagar-shirwalkar/servicenow-atlas (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 72 tokens to every session and 1,146 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
mongodb-mcp-v3-migration
Migrates external consumer code from the mongodb-mcp-server v1/v2 single-package API to the v3 scoped-package structure. In v3, mongodb-mcp-server is a binary-only package (npx / MCPB); library embedding uses @mongodb-js/mcp-cli, @mongodb-js/mcp-core, @mongodb-js/mcp-http-runners, @mongodb-js/mcp-tools-, and the other…
rag-web-fallback
Only reach for external web search when the local corpus comes back empty or clearly insufficient. Forces the agent to try knowledge-rag first, then explicitly document why it needed to escalate. Prevents wasted API cost, latency, and (in air-gapped deployments) accidental network calls.
servicenow-cmdb
ITOM CMDB operations on the ServiceNow CMDB + CI Lifecycle Management APIs via the servicenow-api MCP server — query configuration items by class, read a CI with its attributes and relations, create/update/patch CI instances, manage CI relationships, and drive the CI lifecycle (status, actions, leases, operators). Use…
servicenow-import-attachment-batch
ServiceNow data-ingest, file, and batched-REST surface — push rows through Import Sets (single & bulk), upload/get/delete record attachments, and bundle many REST calls into one batch request via the servicenow-api MCP server. Use when the agent must load external data through a transform-mapped import set, attach or…
servicenow-platform-utilities
ServiceNow cross-domain platform helpers — send notification email, render deployed Flow Designer flows to Mermaid and read flow metadata, fetch data-classification and application metadata, list activity subscriptions, and push MetricBase time-series via the servicenow-api MCP server. Use when the agent needs a…
servicenow-table-api
Foundational ServiceNow data access — generic Table API CRUD, Aggregate/stats roll-ups, and raw REST escape-hatch via the servicenow-api MCP server. Use when the agent must read, insert, update, patch, delete, count, or aggregate records in ANY ServiceNow table (including scoped app tables with no dedicated API), or…