npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

linmas

v0.9.4

Published

Proof-carrying defensive security reviews for AI-assisted software, with deterministic policy, portable evidence, and human review required.

Readme

Current release: v0.9.4

Linmas 0.9.4 adds Claude Code MCP registration to scoped linmas install. Use --no-mcp to install skills only.

  • linmas_proof_create accepts sealed Codex Security scan directories and verifies staged bundles before publication. Proof tools reject directories reporting inode 0. See the MCP error contract.
  • Claude review capsules now use the valid apiKey authentication mode.
  • Specialist skills require Open questions and a pending-disposition line. The router can decline to recommend a skill when context is missing.
  • A held scope lock error names the lock path.

Use Node.js 24 or newer. See the 0.9.4 release notes for upgrade details and verification limits.

npm install --global [email protected]
linmas --version

Try it in 60 seconds

From a clone of this repository, with Node.js 24 or newer:

npm ci
npm run demo:judge

The default offline demo is an OFFLINE FIXTURE REPLAY — NO MODEL CALL. It needs no provider credentials and makes no network call. It validates a synthetic SQL-injection change, replays a checked-in normalized result, evaluates the baseline-appsec policy, and validates the generated capsule in memory.

Example output:

LINMAS PROOF REVIEW
Execution   OFFLINE FIXTURE REPLAY — NO MODEL CALL
Finding     Confirmed · High · SQL injection
Policy      BLOCKED
Safety      Human review remains required.
Capsule     Validated in memory

This is a reproducible demonstration of the review pipeline, not a claim that a model was called during offline replay.

OpenAI Build Week 2026 — historical participation

Linmas was previously included in the OpenAI Build Week 2026 hackathon. That participation has ended: this repository is not an active event submission, and event-specific instructions are no longer part of the current project guidance.

The dated Build Week implementation and reproducibility record remains available as historical context. The archived synthetic examples can still be run as a normal offline demonstration:

git clone https://github.com/TanKimGwan/linmas.git
cd linmas
npm ci
npm run demo:judge
npm run demo:proof

The checked-in sample is examples/build-week/insecure-query.diff. Both commands above use synthetic, offline fixtures and make no model call. The separate live Codex path is opt-in and sends only the explicitly named input after confirmation.

Key engineering decisions were deliberate:

| Decision | Reason | |---|---| | Keep the default offline demo path | The demo is deterministic, needs no credentials or network dependency, and clearly says that no model was called. | | Separate live execution behind --live --yes | Review content cannot leave the machine through the demo without explicit intent. | | Validate model output before policy or evidence creation | Malformed provider output cannot bypass the Linmas result contract. | | Bind capsules to exact input bytes with SHA-256 | Review evidence stays tied to the input that was actually evaluated. | | Require human review for every result | A model finding, policy pass, or valid proof bundle is evidence, never automatic approval or certification. |

See the historical Build Week implementation and reproducibility record for the dated baseline, feature commits, verified live configuration, architecture, commands, and limitations. Current installation options and supported platforms are summarized below and in the usage guide.

Documentation

Choose the guide that matches your language and installation goal:

GitHub's standard repository navigation exposes fixed tabs; these public usage guides are tracked at the repository root and linked here for reliable discovery. The guides are intentionally excluded from the npm package.

AI agent compatibility

Linmas remains Codex-first as a native integration while staying portable across AI coding agents. Codex was also the primary integration used in the historical OpenAI Build Week 2026 project. The compatibility evidence policy defines the limits of current claims. Installation detection is not runtime conformance; compatibility with other agents depends on the integration level below.

Version 0.9.4 extends scoped managed installation with optional Claude Code MCP registration. The content identity is revision-bound; release artifact hashes and provenance bind the bytes actually published. A prior accepted SHA does not automatically qualify later source changes. Neither the identity file, offline fixtures, nor publication establishes live host or model behavior.

| AI agent or surface | Status | Supported integration | | --- | --- | --- | | Codex | Primary / native | Git marketplace plugin, eleven skills, seven native MCP tools, managed skill directory, and provider-backed review. | | Claude Code | Managed installation adapter | Managed installation of eleven skills with optional MCP registration through the Claude Code CLI. Claude API provider-backed review is a separate integration. Claude Code form elicitation remains unverified. | | Hermes Agent | Partial / format-level only | Linmas SKILL.md content is a candidate for Hermes manual loading. Actual Linmas execution, MCP registration, and safety enforcement are UNKNOWN until separately tested. | | Gemini CLI and other coding agents | Portable / manual | The Markdown skill instructions can be imported or adapted where the agent supports equivalent instructions. Linmas does not yet provide a Gemini-specific installer, provider adapter, or MCP registration. |

“Portable / manual” means the defensive instructions can be reused; it does not mean native integration has been verified. New native hosts must have deterministic detection, install/uninstall tests, safety-boundary parity, and a maintenance owner before Linmas labels them verified.

Why the name “Linmas”?

Linmas stands for Perlindungan Masyarakat—an Indonesian phrase for community protection. The name reflects the idea that useful protection should be close to the people doing the work, available before a problem becomes an incident, and understandable enough to support better human decisions.

That idea matters for AI-assisted software. Solo developers, indie hackers, vibe coders, maintainers, and engineering teams can ship quickly without always having a dedicated security specialist nearby. Linmas gives them a practical first checkpoint: focused security skills, a bounded review workflow, deterministic policy, and portable evidence that can be inspected rather than blindly trusted.

Linmas is not the “police”, “military”, or final authority of application security. It is intended to be the first layer of defense closest to everyday builders—helping people notice risks earlier, ask better questions, and bring stronger evidence to the humans responsible for the final decision.

This open-source project is independently developed. It is not affiliated with any government institution, and its name does not imply government authority, certification, or endorsement. It is also not endorsed by OpenAI.

Who Linmas is for

  • solo developers and indie hackers building with AI coding agents;
  • vibe coders who need security guidance without becoming security specialists first;
  • engineering teams that want repeatable defensive review and evidence;
  • maintainers who want safer review workflows for open-source projects; and
  • security practitioners who need bounded specialist instructions for authorized work.

Run a live Codex review

If Codex is already usable on the machine, run a synthetic case live:

npm run demo:judge -- --live --yes

Without --model, Linmas uses the single default reported by the current Codex account and fails closed if selection is ambiguous. For an explicit model selection:

npm run demo:judge -- --live --yes --model gpt-5.6-sol

The live demo is intentionally opt-in. --yes acknowledges that the named input leaves the machine. To preserve an atomic evidence artifact:

npm run demo:judge -- --live --yes --capsule review-capsule.json

Or review your own explicit input:

npx linmas review \
  --skill linmas-secure-code-reviewer \
  --input patch.diff \
  --provider codex \
  --model gpt-5.6-sol \
  --policy baseline-appsec \
  --capsule review-capsule.json \
  --yes

On 2026-07-18, one authorized synthetic run was verified with Codex CLI 0.144.5, ChatGPT subscription authentication, and the account-visible gpt-5.6-sol model. It returned a schema-valid high-severity SQL-injection finding and a blocked policy decision. This is evidence for that tested configuration, not a guarantee that the model is available to every account.

The Review Capsule

A Review Capsule is a versioned JSON evidence object that connects:

  • the SHA-256 digest and byte length of the exact input;
  • the selected Linmas skill and policy;
  • offline fixture or live execution mode;
  • the normalized finding and deterministic policy result;
  • a small allowlisted provider metadata set; and
  • the canonical safety boundary: Human review remains required.

Capsules are written with destination preflight and atomic no-overwrite behavior. They deliberately exclude raw provider responses, credentials, email addresses, session identifiers, and request identifiers.

A capsule is not a digital signature, remote attestation, certification, or proof that software is secure. It is a reviewable evidence envelope for a bounded run.

The Proof Chain

Turn a validated Review Capsule or a completed Codex Security sealed scan into a portable, human-reviewed evidence bundle:

linmas proof create review-capsule.json --bundle proof-bundle
linmas proof verify proof-bundle
npm run demo:proof

The creation wizard records a disposition and rationale for every finding, derives an overall disposition, and writes decision-receipt.json, report.md, report.html, and hashed source evidence. The bundle is immutable at the destination and can be verified offline without provider credentials or network access.

Codex Security imports require the complete sealed scan directory containing scan-manifest.json, findings.json, and coverage.json. Linmas verifies the manifest references and artifact hashes before importing the three structured files. It does not copy the full scan, execute scan content, or accept a findings-only file as a verified source.

SSH signing is optional. A valid signature proves integrity and key possession; identity becomes trusted only when the verifier supplies a matching --allowed-signers file:

linmas proof create review-capsule.json --bundle signed-proof --signing-key ~/.ssh/id_ed25519
linmas proof verify signed-proof --allowed-signers ~/.ssh/allowed_signers --output json

When --allowed-signers is supplied, verification requires a valid signature from a listed signer: an unsigned bundle, or one whose signature cannot be verified, fails with exit code 4 instead of being reported as unsigned. The signing principal must match the reviewer principal recorded in the decision receipt, and the verified principal is shown in the output. Verification also rejects files in the bundle that the manifest does not list (only manifest.json and signature/manifest.sig are outside the list by design). This includes empty directories and files that tools add on copy, such as macOS Finder's .DS_Store; copy bundles with a tool that preserves the exact contents, or remove such files before verifying. Without --allowed-signers, an unsigned bundle still verifies and is labelled unsigned, and a signature checked against the bundle's own key is labelled self-asserted.

proof create never replaces an existing destination: it builds the bundle in a private staging directory next to the destination, claims the destination exclusively, and moves the complete bundle in with a single rename, so a destination created by anything else, even while the bundle is being written, is rejected as already existing. When cleanup succeeds, a failed or cancelled write leaves no partial bundle, staging directory, or lock file. These guarantees have limits when another process with write access to the parent directory races the writer in the short windows between its checks and its renames:

  • Such a process can still have an empty directory it created at the destination replaced by the bundle or by an entry that cleanup puts back, or removed during cleanup. This includes cleanup when the claim cannot be moved aside (the writer then falls back to an in-place check and rmdir) and the case of a reused directory inode. With a stable workspace and destination parent, the writer preserves existing file contents and removes its private staging on failure, though a cleanup failure can leave a temporary artifact.
  • If cleanup finds that the claimed destination was swapped for someone else's entry while the destination is occupied again, it leaves that entry under a hidden .<name>.<id>.release name next to the destination instead of deleting it or replacing the new occupant.
  • On Windows the writer skips the claim and relies on rename never replacing an existing directory; this path has not been tested on Windows.

In 0.9.4, the proof create writer (CLI and MCP) rejects a destination parent whose filesystem reports inode 0 because the writer cannot establish identity there. An MCP prepare call with confirm_write=false checks that the destination parent is a regular directory within the workspace and that the path contains no symlinks. The MCP proof tools also reject a workspace root or proof directory that reports inode 0.

Proof bundles are evidence summaries, not approvals, certifications, or proof that software is secure. Human review remains required.

Compare before and after

Compare two capsules locally, without a provider or network call:

linmas review compare before.json after.json

The comparison validates both complete capsules, then reports added, resolved, persistent, and changed findings plus the policy transition. The policy transition is read from the capsules as recorded and is labelled self-reported (policyTransition.source: "capsule-self-reported" in JSON); compare does not re-evaluate it against a policy pack. It does not claim that an empty delta proves security.

Text output from review compare, review, policy results, proof, and the host commands (list, detect, doctor, onboard, install, uninstall) shows untrusted values (finding IDs, provider text, policy text, manifest paths, principals, skill metadata, host detection results, install and backup paths, and argument errors) with control characters, line and paragraph separators, bidi controls, zero-width and other invisible characters (such as soft hyphens and invisible operators), tag characters, and lone surrogates escaped as visible \uXXXX (or \u{XXXXX}) text, so a capsule cannot drive the terminal or disguise what it prints. Review evidence, remediation, and verification text keep their line breaks and tabs, but every continuation line is indented with |, so provider text cannot start a line that looks like Linmas output. A zero-width joiner inside an emoji sequence is shown as \u200d between the parts. JSON output (--output json) is unchanged and uses standard JSON escaping.

Deterministic policy, never automatic approval

Apply a built-in declarative policy after normalization:

linmas review --skill linmas-secure-code-reviewer --input patch.diff --provider codex --policy baseline-appsec

Built-in packs are baseline-appsec, cloud-change, and release-security. Local policy files are bounded, schema-validated JSON with no commands, code, expressions, templates, plugins, remote imports, or provider hooks. Rule severities and statuses must use the exact, case-sensitive ReviewResult values (Critical, High, Medium, Low, Info; Confirmed finding, Needs validation, Recommendation); a pack with any other value is rejected.

Decisions are pass, needs-review, or blocked. A policy pass does not prove the change is secure, compliant, certified, or approved. Safety failures fail closed, and human review is required for every result.

Authentication and privacy boundaries

Linmas is subscription-first for Codex. It supports accounts whose Codex installation reports either:

  • ChatGPT subscription authentication; or
  • a Codex-managed API key authentication class.

Linmas does not log you in, ask for an OpenAI API key, or store credentials. Codex owns authentication. Linmas uses the Codex app-server capability surface to classify the current auth mode and list account-visible models, then verifies the explicitly selected model before live execution.

Prepare mode reads only the named input file or explicit stdin, never invokes Git, never scans the repository, and makes no network call:

linmas review --skill linmas-secure-code-reviewer --input patch.diff

For compatibility, the legacy alias also resolves:

linmas review --skill secure-code-reviewer --input patch.diff

Native MCP tools accept both the namespaced specialist ID and this legacy alias, then normalize both to the same specialist contract. Invalid MCP requests return schema-versioned errors with safe field/reason metadata. Provider failures use granular codes such as PROVIDER_CONFIGURATION_MISSING, PROVIDER_RATE_LIMITED, and PROVIDER_TRANSPORT_FAILED; credentials, review input, raw stderr, and provider responses are never returned.

The MCP error contract lists every public code, generic message, and default stage. Internal failures use INTERNAL_ERROR; capsule failures after a provider response use CONTRACT_VIOLATION at capsule-write, and incompatible policy results use POLICY_RESULT_INCOMPATIBLE while request policy validation retains POLICY_UNSUPPORTED.

Live execution is separately enabled and visibly confirms that data leaves the machine. Linmas constructs the request from the named input and runs Codex in a managed temporary working directory with a read-only sandbox request, approvals disabled, an ephemeral session, and user config and repository rules ignored.

Those controls reduce ambient influence, but this does not guarantee that Codex cannot read other filesystem paths permitted by the host and Codex sandbox.

Linmas makes no claim of filesystem isolation to the named input. Use live review only with content you are authorized to transmit.

Linmas-branded security skills

Every public skill is namespaced for discoverability and attribution:

| Skill | Focus | |---|---| | linmas-secure-code-reviewer | Application security findings, threat modeling, and remediation. | | linmas-smart-contract-reviewer | Authorized smart-contract and protocol risk review. | | linmas-cloud-hardening-architect | IAM, segmentation, workload, and platform hardening. | | linmas-controls-compliance-reviewer | Control mapping, evidence, and audit-readiness gaps. | | linmas-incident-triage-lead | Classification, containment planning, and evidence preservation. | | linmas-exploit-validation-specialist | Bounded proof-of-impact in authorized environments. | | linmas-secure-systems-architect | Trust zones, identity, and secure system design. | | linmas-security-domain-router | Route a request to the appropriate Linmas specialist. | | linmas-security-operations-lead | Monitoring, escalation, and operational hardening. | | linmas-detection-rules-engineer | SIEM logic, telemetry mapping, tuning, and false-positive reduction. | | linmas-threat-research-analyst | IOC analysis and intelligence-to-detection translation. |

Legacy unprefixed names remain aliases for migration, but new documentation and installations use canonical linmas-* identities.

Installation hosts and execution providers

Installation hosts and execution providers are independent:

| Capability | Supported surface | |---|---| | Installation hosts | Claude Code and Codex managed skill directories | | Execution providers | Claude and Codex provider-native configuration |

Credentials are never stored in an installation manifest. Live execution is opt-in. In 0.9.3, the Claude provider reported authMode as api-key, which caused capsule validation to fail after the provider responded. In 0.9.4 it reports apiKey, which the validator accepts for CLI --capsule and MCP linmas_review_execute. Gemini and other agents are not registered installation hosts or execution providers in 0.9.4. Additional installation hosts remain demand-driven and require testable install/uninstall behavior, safety-boundary parity, and a maintenance owner.

npx linmas list
npx linmas detect
npx linmas onboard
npx linmas install linmas-secure-code-reviewer --dry-run
npx linmas install linmas-secure-code-reviewer
npx linmas doctor
npx linmas uninstall linmas-secure-code-reviewer

Security advisor skills

The skill files remain useful directly inside compatible coding agents. Each specialist defines an advisor review mode, a design review mode, and a stable finding vocabulary:

  • Confirmed finding — supported by concrete evidence;
  • Needs validation — plausible but missing proof;
  • Recommendation — preventive improvement rather than a demonstrated defect.

In 0.9.4, the ten specialist skills tighten their output contract. These are instructions to the agent; Linmas does not enforce them on agent output. Each skill asks for Scope and assumptions, Findings, Open questions, Recommended deterministic checks, and Safety boundary, in that order. Every finding must include all contract fields (Status, Severity, Evidence, Affected surface, Preconditions, Remediation, Verification) and exactly one Severity value: Critical, High, Medium, Low, or Info. Assumptions without supporting evidence belong under Open questions as questions, not in findings as fact. Until a person gives a disposition, every review response must state “Human review disposition is pending.” The official dispositions are A fix_requested, B continue_with_note, C manual_review_required, and D custom_instruction. If linmas_review_decide or its form is unavailable, the agent must list only these choices and not pick one. The letters A–D are reserved for these dispositions and must not label the agent's own options. The compliance reviewer gives effort as a range with stated assumptions. Exploit-validation plans may contain only steps explicitly within the authorized scope, and no state changes, such as writes, resets, or cleanup, that the scope does not authorize.

linmas-security-domain-router recommends a specialist while preserving scope and authorization. It is instructed to name at most one lead skill and one alternate, and, when the domain, target, and goal are all unknown, to make no recommendation and ask clarifying questions instead. Optional repository policy can shape agent behavior, but it does not automatically filter every agent response. Human review is required.

Secure code advisor review

linmas-secure-code-reviewer emphasizes affected surface, preconditions, impact, remediation, and verification. Its deterministic checks are recommendations that run only when invoked. Optional repository policy can strengthen local review conventions but does not automatically filter every agent response or replace human review.

Historical Build Week implementation notes

| Before the Build Week implementation | Linmas Proof Review | |---|---| | A collection of defensive skill instructions | A bounded review workflow plus branded installable skills | | Provider output without portable evidence | Strict normalized result and exact-input Review Capsule | | Provider-specific credential assumptions | Codex-native ChatGPT subscription or Codex-managed API key discovery | | Individual review result | Deterministic policy and offline before/after comparison | | Manual product walkthrough | 60-second offline demo plus explicit live path |

Codex contributed as the provider-native review engine, implementation collaborator, and verification surface. Humans chose the scope, authorization boundaries, model, policy thresholds, safety contract, privacy language, publication scope, and final commits. See the historical Build Week evidence for the verifiable history and reproduction commands.

Platform and runtime

  • Node.js >=24 is required.
  • The offline workflow and package entrypoint are provider-independent and tested on Linux and Windows.
  • The verified live evidence was collected on Linux.
  • Codex executable discovery covers native POSIX and Windows layouts; unsafe Windows .cmd and .bat shims are rejected.
  • Codex authentication isolation is cross-platform: POSIX uses no-follow/nonblocking descriptor reads, while Windows validates file identity before reading only from the opened descriptor. User config.toml content is never inherited by the isolated launch.
  • Scoped managed install and uninstall apply both fail closed on Windows with SAFE_FILESYSTEM_OPERATION_UNAVAILABLE. Node.js 24 does not expose the handle-relative mutation primitive needed to preserve Linmas's anti-substitution invariant. Scoped preview, dry-run, doctor, list, offline review, and package execution remain read-only/available; this statement does not establish Windows support for legacy install flows.
  • The native MCP stdio path is verified on Linux with Node.js 24+. Native Windows MCP and a successful live Windows provider run are not currently claimed.

Install managed skills

Run npx --yes [email protected] install to start the interactive wizard. To choose a project scope and method explicitly:

npx --yes [email protected] install --skill linmas-secure-code-reviewer --agent claude --scope project --project "$PWD" --method symlink --yes

The native installer manages Claude Code and Codex skills in a project or your user home. --project must name an existing directory; project scope writes under that directory, while global scope writes under your home. This is not an npm global executable install.

Preview a project symlink install, then confirm it:

node bin/linmas.mjs install --skill linmas-secure-code-reviewer --agent claude --scope project --project /path/to/project --method symlink --dry-run
node bin/linmas.mjs install --skill linmas-secure-code-reviewer --agent claude --scope project --project /path/to/project --method symlink --yes

Use --agent codex or repeat --agent to select both hosts. --all selects every Linmas skill but does not select every host. --method copy creates independent files; --method symlink keeps one durable copy under .agents/skills and attaches Claude with a relative link. The .agents directory is shared discovery space, so a skill may be visible to another compatible harness even when only one host was selected.

Inspect ownership and remove only the selected skill and host:

node bin/linmas.mjs doctor --scope project --project /path/to/project
node bin/linmas.mjs uninstall --skill linmas-secure-code-reviewer --agent claude --scope project --project /path/to/project --dry-run
node bin/linmas.mjs uninstall --skill linmas-secure-code-reviewer --agent claude --scope project --project /path/to/project --yes

Local edits and files without a valid Linmas ownership record are preserved. Replacing modified or unmanaged skills requires interactive backup confirmation. When applying changes, scoped install and uninstall stop if .agents/.linmas-install.lock already exists. They print the lock path and tell you to move it aside if no Linmas installer or uninstaller is running in that scope. --dry-run returns before attempting to take the lock. Install the Codex MCP plugin through its marketplace. See Native MCP plugin.

In 0.9.4, the Claude Code installer previews the linmas stdio server and offers to register it with claude mcp add-json. Linmas maps global scope to Claude's user scope and project scope to project. Setup copies the runtime into a private directory under .agents in the selected home or project and registers the absolute path to .agents/linmas-mcp/mcp/server.mjs. Project registration writes a machine-specific absolute path to the project's .mcp.json. Claude Code may ask you to approve it when you open the project.

--yes confirms the scoped preview, including MCP. It does not approve replacing modified or unmanaged content. Use the interactive preview and backup confirmation for skill replacements. Use --no-mcp for skills only or --dry-run to preview without writing. If the registration attempt fails, the command keeps the installed skills. The exit status depends on the failure described below. If an unmanaged linmas MCP entry already exists, install preserves it, reports the conflict, and exits nonzero when MCP setup is confirmed. Use --no-mcp to install skills without checking the entry.

Rerun linmas install to refresh an outdated runtime at the same registered path when Linmas still owns the copy and its content is unchanged. Restart Claude Code sessions after a refresh. Claude Code starts the server with node from its PATH. Linmas preserves modified or replaced runtimes and prints recovery steps.

On a first-time setup with unambiguous configuration, install keeps the skills, leaves no MCP runtime or record, and exits 0 when claude is absent from PATH or the spawn fails with ENOENT, ENOEXEC, or EACCES. This also applies when add-json exits 126 or 127 without registering the entry and a claude --version probe also fails to start or exits 126 or 127. Rerun linmas install once Claude Code works. If the registration attempt fails with an existing MCP record and intact runtime, install keeps both and exits 0 only when no executable claude is on PATH or the spawn fails with ENOENT. Other registration failures exit nonzero and retain the record and runtime. Install checks an existing runtime even when claude is missing and prints recovery steps if the runtime is modified, replaced, or missing. When install verifies that the runtime and its scoped entry are both gone, it drops the stale record without recovery instructions. Global scope requires unambiguous user configuration.

Linmas looks for alternate Claude user configs (.config.json or another .claude*.json) in $CLAUDE_CONFIG_DIR (or $HOME if unset), $HOME, and $HOME/.claude. A candidate or an unreadable scan directory blocks global MCP setup and cleanup. Linmas reports the paths and keeps existing MCP data. Doctor reports the configuration as unverified and exits 0. Remove or consolidate unused configs, or use --scope project or --no-mcp for install.

An entry you register independently has no Linmas install ID and stays user-owned. Linmas cleans up its registration and runtime when the last managed Claude skill in the scope is removed. Claude Code removes MCP entries by name, so keep other processes from changing the Claude configuration during uninstall. Use linmas doctor --scope project|global to check the entry and runtime.

Registration and runtime are specific to the machine and checkout path. Add .agents/linmas-mcp and .agents/.linmas-mcp-* to the project's .gitignore. Keep the linmas entry in .mcp.json out of commits. Uninstall before moving a project and reinstall per checkout. After uninstall, Claude Code may leave an empty mcpServers object in .mcp.json.

For uninstall, use the same checkout and Claude configuration directory. Cleanup after manual removal can finish without the Claude CLI once Linmas verifies absence. If alternate configs block cleanup, check the recorded runtime path and install ID, remove the entry if it belongs to this installation, then back up and remove or consolidate unused configs. Retry the same scoped uninstall or use the scoped command printed by a legacy uninstall.

Uninstall exits nonzero and retains the runtime and record if another entry's args contains the exact recorded server path. Linmas checks other top-level entries in the project's .mcp.json or the global .claude.json, where it also checks entries under projects.*.mcpServers. Remove or repoint the named entry and retry. Check Claude profiles in other directories and other projects' .mcp.json files before uninstalling. References outside the scan can outlive the runtime.

If a global registration is still pending verification and the primary file has no linmas entry, uninstall exits nonzero and keeps the runtime and record. Find the file Claude Code actually used and remove the linmas entry if it is yours. Ensure Claude Code uses the primary file, then rerun the same global linmas install to re-evaluate the record, or remove the runtime paths Linmas prints manually.

If you need to remove a verified owned entry manually, run claude mcp remove --scope project linmas from the project for project scope, or claude mcp remove --scope user linmas from your home with the same Claude configuration directory for global scope. For a moved checkout, modified runtime, or directory-based runtime migration, follow the MCP-only backup paths printed by Linmas, remove the entry if it belongs to this checkout, and rerun the original install. Use linmas doctor to locate abandoned staging paths and move them aside once they are unused.

The older unscoped install/uninstall path and its version 1 host manifests remain available. For a global Claude migration, the legacy command and managed installer target the same $CLAUDE_CONFIG_DIR/skills/<skill> path (default $HOME/.claude/skills/<skill>). Archive and verify the legacy directory and manifest, remove the v1 entry, then install the managed global copy; running legacy uninstall after the scoped install can delete the replacement. For a Claude Code legacy install, create and verify an archive on a POSIX system:

SKILL=linmas-secure-code-reviewer
LEGACY_ROOT="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
BACKUP_DIR="$(mktemp -d)"
mkdir "$BACKUP_DIR/verify"
tar -cpf "$BACKUP_DIR/legacy.tar" -C "$LEGACY_ROOT" "skills/$SKILL" linmas-manifest.json
tar -xpf "$BACKUP_DIR/legacy.tar" -C "$BACKUP_DIR/verify"
diff -r "$LEGACY_ROOT/skills/$SKILL" "$BACKUP_DIR/verify/skills/$SKILL"
cmp "$LEGACY_ROOT/linmas-manifest.json" "$BACKUP_DIR/verify/linmas-manifest.json"

Only after both comparisons succeed, retain the archive and remove the legacy v1 entry by choosing Claude and confirming:

node bin/linmas.mjs uninstall "$SKILL"
test ! -e "$LEGACY_ROOT/skills/$SKILL"

Then install and verify the managed global copy:

node bin/linmas.mjs install --skill "$SKILL" --agent claude --scope global --method copy --yes
node bin/linmas.mjs doctor --scope global

Repeat the archive and verification with the detected legacy host root for Codex. A healthy managed destination does not prove that legacy edits or extra files were copied there; the archive is their recovery copy. Do not mix native ownership with the skills CLI lock or a marketplace cache; those paths have their own lifecycle.

Install through the Agent Skills CLI

For the separate ecosystem-managed route, pin the skills CLI version and let it manage its own lock and lifecycle:

npx --yes [email protected] add TanKimGwan/linmas --skill linmas-secure-code-reviewer --agent claude-code --copy --yes
npx --yes [email protected] list --agent claude-code
npx --yes [email protected] update linmas-secure-code-reviewer --yes
npx --yes [email protected] remove linmas-secure-code-reviewer --agent claude-code --yes

The repository argument follows its default remote ref; it is separate from the pinned CLI version. This route installs skill files only and does not configure Linmas MCP. Use the Codex marketplace section below when you want the plugin and MCP tools.

Native MCP plugin

Install the public Git marketplace and the Linmas plugin:

codex plugin marketplace add TanKimGwan/linmas --ref main
codex plugin add linmas@linmas
codex plugin list

Important: marketplace visibility is per device

This is a public GitHub repository marketplace, not yet an entry in the global Codex/ChatGPT Plugins Directory. Therefore, Linmas will not automatically appear in search on another computer just because you are signed in to the same ChatGPT account. Add the marketplace once on each computer:

codex plugin marketplace add TanKimGwan/linmas --ref v0.9.4
codex plugin add linmas@linmas
codex plugin list

After installation, restart Codex completely and create a new task. If linmas@linmas is still not listed, verify that the computer has Git, Node.js 24+, and network access to GitHub. The official Plugins Directory is a separate publication channel that requires OpenAI submission, review, and approval; GitHub and npm publication do not automatically add Linmas to that global catalog.

To pin an immutable release instead of following main, replace --ref main with --ref v0.9.4. After installation or upgrade, restart the Codex desktop/app-server and start a fresh task. A stale app-server can retain an MCP child process from an older or deleted plugin cache.

To refresh an existing marketplace installation that follows a moving ref such as main, run:

codex plugin marketplace upgrade linmas
codex plugin add linmas@linmas
codex plugin marketplace list --json
codex plugin list --json

marketplace upgrade refreshes the configured ref; it does not change an immutable v0.8.0 ref, and a second marketplace add with --ref v0.9.4 is rejected while the old source is registered. Move a pinned installation from v0.8.0, v0.9.2, or v0.9.3 to v0.9.4 with these steps: remove the installed plugin and old marketplace, re-add with --ref v0.9.4, install the plugin again, and verify the configured ref and installed version. See the 0.9.0 upgrade guidance. Always restart Codex and start a fresh task after verification.

The public marketplace tracks a ready-to-install plugin at plugins/linmas. Maintainers regenerate it from canonical sources and verify every file byte-for-byte:

npm run sync:codex-marketplace
python3 "${CODEX_HOME:-$HOME/.codex}/skills/.system/plugin-creator/scripts/validate_plugin.py" plugins/linmas

Npm users can also build an independent local plugin directory:

npm run build:codex-plugin -- --target /absolute/path/to/plugins/linmas
python3 "${CODEX_HOME:-$HOME/.codex}/skills/.system/plugin-creator/scripts/validate_plugin.py" /absolute/path/to/plugins/linmas

The builder copies exactly eleven canonical Linmas skills, the bounded MCP server, policy/runtime files, .mcp.json, and the package metadata required to report the canonical version. It does not mutate a user's marketplace configuration. Development cachebusters are host-artifact metadata and are not part of the canonical source or package version.

The MCP server exposes exactly seven tools:

| Tool | Boundary | |---|---| | linmas_review_decide | Interactive or text-fallback human disposition after findings are available; never an approval. | | linmas_review_prepare | Offline preparation; no provider and no writes. | | linmas_review_compare | Offline capsule comparison. | | linmas_policy_evaluate | Offline deterministic policy evaluation. | | linmas_proof_verify | Offline proof-bundle verification. | | linmas_proof_create | Local write only after confirm_write=true. | | linmas_review_execute | Provider transmission only after confirm_transmission=true; returns the bound reference needed by linmas_review_decide. |

Tool results expose bounded status values such as prepared, verified, and executed, plus humanReviewRequired=true; every result remains needs_human_review. A prepared result does not call a provider or write output. Offline tools do not transmit data. A provider-backed review transmits only after explicit consent, and a proof bundle is written only after explicit write confirmation. Timeouts signal cancellation of provider work and are checked before normalization, policy evaluation, and filesystem publication steps. A filesystem operation already in progress can still complete. If an in-flight link publishes a review capsule after cancellation, Linmas attempts to remove it. In 0.9.4, linmas_proof_create waits for in-flight filesystem work and cleanup once bundle writing starts. The call can return after timeout_ms, and a rename already in progress can still publish the bundle.

In 0.9.4, linmas_proof_create accepts either a capsule file or a sealed Codex Security scan directory as source_path. The source tree and the staged bundle must stay within 32 MiB and 4,096 entries, and the staged bundle is verified before it is published. A call without confirm_write=true also checks the source, the decision receipt, and the bundle size. An invalid scan returns CONTRACT_VIOLATION with reason SEALED_CODEX_SCAN_INVALID; other source filesystem errors return INVALID_PATH; exceeding a limit returns INPUT_TOO_LARGE; cleanup failures return ARTIFACT_WRITE_FAILED. The MCP error contract lists the full rules.

After linmas_review_execute returns, pass reviewReference.handle as review_handle and reviewReference.capsuleDigest as capsule_digest to linmas_review_decide. Do not send a caller-supplied review_result; the decision flow uses the bound process-local reference and exact digest.

Interactive human-review gate

When a reviewer has produced findings, linmas_review_decide requests an explicit disposition through MCP form elicitation when the host supports it. The first form offers:

  • A — Minta agent memperbaiki: agent fixes the findings and reruns the review.
  • B — Lanjutkan dengan catatan khusus: unresolved findings must be included in the final response; Critical/High findings additionally require risk acknowledgement and rationale.
  • C — Hentikan task untuk review manual: agent stops without claiming approval or security.
  • D — Beri tahu agent harus bertindak apa: custom guidance that cannot bypass transmission, write, or safety gates.

If there are no findings, A is omitted. If the host cannot show an MCP form, Linmas returns the same choices as a structured chat fallback and does not choose one automatically. Every result carries reviewInteraction.elicitationConfirmed: true only when a person accepted the MCP form and selected a disposition, false when the form was declined or cancelled and for the text fallback, where the tool caller (possibly the agent) supplies the decision and Linmas cannot confirm a human entered it. A generic “lanjutkan” is not sufficient disposition. The gate uses the MCP protocol's client-side form elicitation; host permission modes remain separate controls.

The form requires a registered Linmas MCP server and host support for form elicitation. Automated tests use a simulated Claude CLI. A manual smoke test with Claude Code 2.1.332 on Linux with Node.js 24 used project scope and the symlink runtime layout. It listed seven tools, and uninstall removed the entry, leaving {"mcpServers": {}} in .mcp.json. Other Claude Code versions, macOS, Windows, and Claude Code form elicitation remain unverified. Full Access and --dangerously-skip-permissions control command permission prompts. If the active host suppresses or lacks MCP elicitation, the structured chat fallback remains mandatory.

Command reference

| Command | Purpose | |---|---| | linmas --help (-h) | Print the command summary and options. | | linmas --version (-v) | Print the installed Linmas version. | | linmas list | List canonical Linmas skills. | | linmas detect | Detect supported installation hosts. | | linmas onboard | Inspect host and Codex account capabilities. | | linmas doctor | Diagnose managed installations and duplicates. | | linmas install <skill> | Install one canonical skill; add --dry-run to preflight. From source, Claude Code installs also offer MCP registration; add --no-mcp to install skills only. | | linmas uninstall <skill> | Remove a Linmas-managed skill on supported POSIX filesystems; Windows fails closed before mutation. | | linmas review ... | Prepare locally (no review is run) or execute an explicit provider review with --provider. | | linmas review compare before.json after.json | Compare two capsules offline. | | linmas proof create <source> --bundle <dir> | Record human decisions and create a portable proof bundle. | | linmas proof verify <dir> | Verify bundle hashes and optional SSH signature offline. | | npm run demo:judge | Run the deterministic offline demo. | | npm run demo:proof | Create and verify an ephemeral offline Proof Chain bundle. | | npm run validate | Validate package structure, skills, examples, and secrets. | | npm run eval:offline | Run checked-in evaluation cases without model calls. | | npm run coverage | Run tests with enforced source coverage thresholds. |

Limitations and safety

  • Linmas is defensive-only and intended for authorized environments.
  • Model findings can be wrong or incomplete; human review remains required.
  • Linmas never approves, merges, releases, or automatically fixes a change.
  • A policy pass or an empty comparison does not prove security.
  • Offline replay is not a fresh model inference.
  • A valid Proof Chain bundle records human disposition; it does not approve or certify a change.
  • Codex Security adapter input must be a completed sealed scan directory; findings-only JSON is not treated as verified evidence.
  • Live review transmits the explicit input to the selected provider after confirmation.
  • No claim is made that a read-only sandbox limits provider reads to the Linmas input.
  • Scoped managed install and uninstall apply are unavailable on Windows until a handle-relative native implementation can authenticate filesystem mutations; Linmas does not fall back to lexical path writes, renames, or deletion.
  • Native MCP support is bounded to the documented Node.js 24+ Linux-verified path; Codex fresh-task discovery requires a separately verified host reinstall and is not implied by direct stdio validation.

Contributing, security, and license

Contributions are welcome through CONTRIBUTING.md. Report vulnerabilities according to the security policy. Community conduct is governed by the Code of Conduct.

Linmas is licensed under Apache-2.0. See NOTICE and TRADEMARK.md for attribution and name-use guidance. Linmas is inspired by Indonesia's community-protection concept, Perlindungan Masyarakat, and is not affiliated with a government institution or endorsed by OpenAI.