# Binary credential format boundary

> Binary credential format boundary is an open-source agent skill for security. Lets an agent audit credential loaders so raw key bytes are never altered before. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/JinNing6/Noosphere/tree/main/shared_skills/active/binary-credential-format-boundary
- **Repository:** https://github.com/jinning6/noosphere
- **GitHub stars:** 18
- **License:** Apache-2.0
- **Skill name:** binary-credential-format-boundary
- **Collection:** https://github.com/JinNing6/Noosphere
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through finding and fixing readers that load fixed-length binary secrets such as Ed25519 or X25519 keys, nonces, digests, MAC keys and signatures from files or environment variables. It focuses on the boundary where bytes are read, stripped, decoded or auto-detected before their length and type are checked, a common cause of cryptographic checks that fail only for some generated values.

The workflow starts by reproducing the failure while recording only exception types, lengths and hashes, then verifies the cryptographic primitive with an in-memory round trip. It traces the byte path from serialization through ingestion and looks for pre-validation mutations such as stripping, newline handling, Unicode decoding, NUL termination or permissive Base64. The skill sets out a parsing pattern that returns raw fixed-length input unchanged and handles Base64 text in a separate, strictly validated branch.

It asks for deterministic regression tests covering whitespace-valued boundary octets, NUL and non-UTF-8 bytes, malformed Base64 and wrong decoded lengths, plus repeated runs of formerly random tests. It also lists fixes to avoid, such as regenerating keys until they avoid whitespace or silently substituting a new credential. No scripts are bundled; the guidance is a single SKILL.md document.

## When your agent uses it

> Audit and repair readers for fixed-length binary credentials and their text encodings without mutating raw bytes. Use when code loads Ed25519/X25519 keys, nonces, digests, MAC keys, signatures, tokens, or other opaque bytes from files or environment values; when `.strip()`, decoding, newline handling, or format auto-detection occurs before length/type validation; or when cryptographic tests fail intermittently for otherwise valid generated material.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/JinNing6/Noosphere/tree/HEAD/shared_skills/active/binary-credential-format-boundary)
- [License: Apache-2.0](https://github.com/JinNing6/Noosphere/tree/HEAD/shared_skills/active/binary-credential-format-boundary)

## Features

- **Raw byte boundary audit:** Traces credential bytes from serialization through file or environment ingestion to the cryptographic primitive, looking for mutations before validation.
- **Unambiguous credential parsing:** Provides a pattern that returns fixed-length raw input untouched and validates Base64 text in its own branch.
- **Boundary-octet regression tests:** Defines deterministic tests for whitespace, NUL and non-UTF-8 bytes at the edges of raw credential values.
- **Flaky test diagnosis:** Treats intermittent cryptographic failures as possible ingestion bugs and checks the primitive with an in-memory control first.
- **Fail-closed rejection rules:** Lists malformed, ambiguous, oversized and wrong-length inputs that must raise errors rather than be repaired or replaced.
- **Secret-safe reporting:** Restricts diagnostics to exception types, lengths and hashes so credential material never appears in logs or reports.

## Good for

- Audit a Python loader that reads Ed25519 keys from a file for stripping bugs
- Fix a Base64 key reader that rejects keys whose raw bytes start with whitespace
- Diagnose intermittent signature verification failures in generated test keys
- Add regression tests for NUL and non-UTF-8 bytes in nonce or token readers

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/binary-credential-format-boundary` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/binary-credential-format-boundary &&
cp -R "$tmp/shared_skills/active/binary-credential-format-boundary" ~/.claude/skills/binary-credential-format-boundary &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/binary-credential-format-boundary` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/binary-credential-format-boundary` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/binary-credential-format-boundary &&
cp -R "$tmp/shared_skills/active/binary-credential-format-boundary" ~/.agents/skills/binary-credential-format-boundary &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/binary-credential-format-boundary` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/binary-credential-format-boundary` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/binary-credential-format-boundary &&
cp -R "$tmp/shared_skills/active/binary-credential-format-boundary" ~/.cursor/skills/binary-credential-format-boundary &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/binary-credential-format-boundary` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/JinNing6/Noosphere.git --path shared_skills/active/binary-credential-format-boundary
```

Or copy the folder to `~/.gemini/skills/binary-credential-format-boundary` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/binary-credential-format-boundary`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/binary-credential-format-boundary &&
cp -R "$tmp/shared_skills/active/binary-credential-format-boundary" ~/.copilot/skills/binary-credential-format-boundary &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/binary-credential-format-boundary` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/JinNing6/Noosphere.git
```

Then copy `Noosphere/shared_skills/active/binary-credential-format-boundary` into your agent's skills folder as `binary-credential-format-boundary`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Binary credential format boundary trigger?

It applies when code loads keys, nonces, digests, MAC keys, signatures or tokens from files or environment values, when stripping or decoding happens before length checks, or when cryptographic tests fail intermittently for valid generated material.

### Does Binary credential format boundary change cryptographic primitives?

No. It instructs the agent to verify the primitive independently first and to fix the ingestion path before touching the cryptography.

### Does Binary credential format boundary include scripts?

No scripts are included. The skill is a single SKILL.md with guidance and a parsing example.

### Can Binary credential format boundary handle PEM or JWK keys?

It recommends using official PEM, DER or JWK loaders for those formats rather than custom detection logic.

### How do I install Binary credential format boundary in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/binary-credential-format-boundary to use it in all your projects, or to .claude/skills/binary-credential-format-boundary in one project.

### Does Binary credential format boundary run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Binary credential format boundary?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Binary credential format boundary?

The closest alternatives to Binary credential format boundary are Secret serialization, Agent security hardening, Signature validation audit, Authentication and Source code scanning.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Secret serialization](https://ai-powered.com/skills/secret-serialization): Secret serialization is an open-source agent skill for security.
- [Agent security hardening](https://ai-powered.com/skills/agent-security-hardening): Agent security hardening is an open-source agent skill for security.
- [Signature validation audit](https://ai-powered.com/skills/signature-validation-audit): Signature validation audit is an open-source agent skill for security.
- [Authentication](https://ai-powered.com/skills/authentication): Authentication is an open-source agent skill for security.
- [Source code scanning](https://ai-powered.com/skills/source-code-scanning): Source code scanning is an open-source agent skill for security.
- [Cross chain bridge audit](https://ai-powered.com/skills/cross-chain-bridge-audit): Cross chain bridge audit is an open-source agent skill for security.
- [Security review](https://ai-powered.com/skills/security-review-getsentry): Security review is an open-source agent skill for security.
- [Axiom security](https://ai-powered.com/skills/axiom-security-charleswiltgen-2): Axiom security is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/binary-credential-format-boundary
