swm-core: Instructions file for Codex

AGENTS.md

swm-core AGENTS.md is an instructions file for Codex, OpenCode from openworkload/swm-core. It costs 1,422 tokens per session, scanned C, original, BSD-3-Clause.

Repository instructions for swm-core, a project written mainly in Erlang with some C++. They describe the source layout, build commands, formatting, and tests.

In plain words
What is it for?
They are for navigating the repository, compiling Erlang and C++, formatting code, running tests, and using the development container.
Why use it?
They give a coding agent the project-specific commands and conventions needed to build and check changes correctly.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is openworkload/swm-core's own configuration. It tells Codex and OpenCode how to work on swm-core itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swm-core configures →

Reuse

Borrowing it

Nothing to install: this file belongs to openworkload/swm-core. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/openworkload/swm-core/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/openworkload/swm-core

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for swm-core AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/openworkload/swm-core/agents-md/github.svg)](https://agentmods.dev/instructions/openworkload/swm-core/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/openworkload/swm-core/agents-md"><img src="https://agentmods.dev/badge/instructions/openworkload/swm-core/agents-md/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.

agentmods 80×15 button for swm-core AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/openworkload/swm-core/agents-md"><img src="https://agentmods.dev/badge/instructions/openworkload/swm-core/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,422 This file is loaded in full into every session.
When invoked 1,422 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01422 $0.01422
Opus 5.5 $0.00569 $0.00569
Sonnet 5.5 $0.00284 $0.00284
Haiku 4.5 $0.00142 $0.00142

Measured 15d ago against content hash c2ac0fbc6fd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

swm-core AGENTS.md scanned grade C with 1 finding 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 15d 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

`/etc/shadow` is **not** bind-mounted (unreadable under keep-id and breaks sudo).
AGENTS.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent instructions — swm-core

Guidance for coding agents working on this repository. The codebase is primarily Erlang/OTP (rebar3) with C++ in c_src/ (Porter and shared libraries).

Stack and layout

  • Erlang: application under src/, headers in include/, rebar.config defines OTP 29+ ({minimum_otp_vsn, "29"}).
  • C++: c_src/porter/ (Porter binary), c_src/lib/ (shared code), built via nested Makefiles; make porter from the repo root.
  • Tests: EUnit and Common Test live under test/ (*_SUITE.erl for CT). rebar3 is ./rebar3 at the repo root.

Build (typical)

  • make gen -- regenerate cog outputs; also runs scripts/format-cpp.sh on c_src/.
  • make format -- format Erlang (rebar3 format) and C++ under c_src/ (scripts/format-cpp.sh, .clang-format).
  • make porter — build C++ Porter.
  • make compile — ./rebar3 compile.
  • make build-all — full build in skyport-dev as $USER; stops SWM first so sync cannot race rebar3/compile.

Prefer existing Makefile and rebar3 targets over ad hoc commands.

Tests

Local CI via nektos/act against the host Podman Docker-compatible API (make act → scripts/run-act.sh). Requires podman.socket (or podman system service) so $XDG_RUNTIME_DIR/podman/podman.sock exists. Repo .actrc sets --network bridge so the job does not share the host port namespace with skyport-dev's published 10001 mapping.

  • Run all CI jobs locally: make act

  • Run Erlang unit tests: make act ARGS='--job unit_tests'

  • Run Erlang common tests: make act ARGS='--job common_tests'

Dev container (make cr)

To get Erlang environment for the project use make cr command to spawn an interactive session in the container, then inside the shell cd to this repository if needed.

  • Image: swm-build:29.1 (see priv/container/debug/Containerfile and scripts/build-debug-container.sh).
  • Podman pod skyport-dev-pod with containers:
    • skyport-dev -- build/shell + swm-core
    • skyport-dev-gate -- cloud gate under supervisord
    • swm-prometheus -- Prometheus (scrapes 127.0.0.1:9568, UI on host :9090) (pod and container names must differ; Podman rejects shared names.)
  • make cr runs scripts/start-debug-container.sh: ensures the pod, then attaches with
    podman exec -ti --user <host-user> skyport-dev /bin/bash
    (same $HOME mount as on the host). Containers use --userns=keep-id (no runuser).
  • Passwordless sudo is set up on make cr (core container). Host /etc/shadow is not bind-mounted (unreadable under keep-id and breaks sudo). Legacy non-pod containers are removed automatically on the next make cr.
  • First podman run --userns=keep-id of the multi-GB swm-build image can take several minutes (ID-mapped layer copy). Do not interrupt it.

Read the full file on GitHub · 92 lines

Changes

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.

  1. 15d ago First seen · 92 lines · 1,422 tokens per session scan C c2ac0fbc6fd7

Subscribe to this mod's changes

swm-core AGENTS.md is an instructions file published in the GitHub repository openworkload/swm-core (11 stars, last pushed 12d ago), licensed BSD-3-Clause. It adds 1,422 tokens to every session, about $0.0057 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens