Optimize skill to 97% review score

- Extract full arg tables and analysis catalog to REFERENCE.md
- Slim SKILL.md from 206 to 130 lines
- Description: 100% (specificity, triggers, completeness, distinctiveness)
- Content: 92% (conciseness, actionability, workflow clarity, progressive disclosure)
- Overall: 97% via tessl skill review
This commit is contained in:
GangGreenTemperTatum 2026-06-15 08:51:47 -04:00
parent a9fa2b780e
commit 02ab9a624c
No known key found for this signature in database
GPG Key ID: 97A6E04DE3B622D3
2 changed files with 157 additions and 115 deletions

View File

@ -0,0 +1,118 @@
# ST3GG Tool Reference
## stegg_encode — Full Arguments
| Arg | Type | Default | Description |
|---|---|---|---|
| `image_path` | str | required | Path to carrier image (PNG recommended) |
| `payload_text` | str | `""` | Text to hide (mutually exclusive with `payload_file`) |
| `payload_file` | str | `""` | Path to file whose bytes to hide |
| `output_path` | str | auto | Where to write stegged image |
| `channels` | str | `"RGB"` | Channel preset (see below) |
| `bits_per_channel` | int | `1` | Bits per channel, 1-8 |
| `strategy` | str | `"interleaved"` | Embedding strategy |
| `seed` | int | `0` | Random seed for randomized strategy |
| `password` | str | `""` | Encryption password (AES-256-GCM) |
| `compress` | bool | `true` | zlib-compress payload before encoding |
## stegg_decode — Full Arguments
| Arg | Type | Default | Description |
|---|---|---|---|
| `image_path` | str | required | Path to encoded image |
| `output_path` | str | `""` | Save extracted data to file |
| `auto_detect` | bool | `true` | Auto-detect config from STEG header |
| `channels` | str | `"RGB"` | Channel preset (manual mode) |
| `bits_per_channel` | int | `1` | Bits per channel (manual mode) |
| `strategy` | str | `"interleaved"` | Strategy (manual mode) |
| `seed` | int | `0` | Seed (manual mode) |
| `password` | str | `""` | Decryption password |
## stegg_inject_chunk — Full Arguments
| Arg | Type | Default | Description |
|---|---|---|---|
| `image_path` | str | required | Path to source PNG |
| `output_path` | str | required | Where to write modified PNG |
| `chunk_type` | str | `"tEXt"` | PNG chunk type (tEXt, zTXt, iTXt, or 4-char private) |
| `keyword` | str | `"Comment"` | Chunk keyword |
| `text` | str | `""` | Text content to inject |
| `compressed` | bool | `false` | Use zTXt compression |
## stegg_inject_exif — Full Arguments
| Arg | Type | Default | Description |
|---|---|---|---|
| `image_path` | str | required | Path to source image |
| `output_path` | str | required | Where to write modified image |
| `comment` | str | `""` | Image comment field |
| `author` | str | `""` | Author / artist field |
| `description` | str | `""` | Image description |
| `title` | str | `""` | Image title |
| `custom_fields` | str | `""` | JSON object of additional key-value pairs |
## Channel Presets (15 options)
`R`, `G`, `B`, `A`, `RG`, `RB`, `RA`, `GB`, `GA`, `BA`, `RGB`, `RGA`, `RBA`, `GBA`, `RGBA`
More channels = more capacity, more visual distortion.
## Bits Per Channel
| Bits | Visual Impact | Use Case |
|---|---|---|
| 1 (default) | Invisible to human eye | Covert operations, PoCs |
| 2-3 | Barely detectable | Good capacity/stealth tradeoff |
| 4+ | Visible artifacts | CTF, non-visual-fidelity scenarios |
## Strategies
| Strategy | Auto-Detect | Decode Needs | Status |
|---|---|---|---|
| `interleaved` (default) | Yes | Nothing extra | Working |
| `sequential` | No | Manual config | Working |
| `spread` | No | Manual config | Upstream decode bug |
| `randomized` | No | Manual config + seed | Upstream decode bug |
## All Analysis Actions (stegg_analysis_tool)
Call `stegg_list_analysis_tools` for the full live list. High-value actions:
| Action | Detects |
|---|---|
| `rs_analysis` | RS steganalysis — most sensitive LSB detector |
| `sample_pairs_analysis` | Complementary statistical approach to RS |
| `png_chi_square_analysis` | Chi-square on pixel value pairs |
| `png_bit_plane_analysis` | Visual attack on individual bit planes |
| `png_steg_signature_scan` | Known steg tool signatures (OpenStego, Steghide, etc.) |
| `png_detect_appended_data` | Data appended after IEND chunk |
| `png_detect_embedded_png` | PNG embedded inside another PNG |
| `png_color_histogram_analysis` | Color distribution anomalies |
| `png_filter_analysis` | PNG filter type analysis |
| `png_visual_attack` | LSB visual attack rendering |
| `detect_homoglyph_steg` | Unicode homoglyph substitution |
| `detect_unicode_steg` | Zero-width character steganography |
| `detect_whitespace_steg` | Whitespace-based encoding |
| `detect_variation_selector_steg` | Unicode variation selector abuse |
| `detect_combining_mark_steg` | Combining diacritical mark hiding |
| `detect_emoji_steg` | Emoji-based steganography |
| `detect_capitalization_steg` | Case-based encoding |
| `jpeg_decode` | JPEG-specific steg analysis |
| `audio_lsb_decode` | WAV audio LSB extraction |
| `pcap_decode` | Network capture steg analysis |
| `pdf_decode` | PDF steganography |
| `zip_decode` | ZIP archive steg analysis |
| `svg_decode` | SVG steganography |
## Injection Filename Templates
| Template | Target |
|---|---|
| `chatgpt_decoder` | ChatGPT image upload |
| `claude_decoder` | Claude image upload |
| `gemini_decoder` | Gemini image upload |
| `universal_decoder` | Any LLM |
| `system_override` | System prompt override |
| `roleplay_trigger` | Roleplay-based bypass |
| `dev_mode` | Developer mode activation |
| `subtle` | Low-profile injection |

View File

@ -18,122 +18,54 @@ description: "Steganography encode/decode, steganalysis, PNG chunk/EXIF injectio
## When NOT to Use
- General EXIF metadata reading/writing without steg context — use `exiftool`
- General EXIF read/write without steg context — use `exiftool`
- Binary file analysis without steg focus — use `binwalk`
- Text-only steganography (zero-width, homoglyphs) — use `parseltongue` MCP tools
## Tool Reference
## Tools
### Encode / Decode
### Core
**`stegg_encode`** — Hide data in an image via LSB steganography.
| Arg | Type | Default | Description |
|---|---|---|---|
| `image_path` | str | required | Path to carrier image (PNG recommended) |
| `payload_text` | str | `""` | Text to hide (mutually exclusive with `payload_file`) |
| `payload_file` | str | `""` | Path to file whose bytes to hide |
| `output_path` | str | auto | Where to write stegged image |
| `channels` | str | `"RGB"` | Channel preset (see Channel Presets) |
| `bits_per_channel` | int | `1` | Bits per channel, 1-8 |
| `strategy` | str | `"interleaved"` | Embedding strategy (see Strategies) |
| `seed` | int | `0` | Random seed for randomized strategy |
| `password` | str | `""` | Encryption password (AES-256-GCM) |
| `compress` | bool | `true` | zlib-compress payload before encoding |
**`stegg_decode`** — Extract hidden data from a steganographic image.
| Arg | Type | Default | Description |
|---|---|---|---|
| `image_path` | str | required | Path to encoded image |
| `output_path` | str | `""` | Save extracted data to file |
| `auto_detect` | bool | `true` | Auto-detect config from STEG header |
| `channels` | str | `"RGB"` | Channel preset (manual mode) |
| `bits_per_channel` | int | `1` | Bits per channel (manual mode) |
| `strategy` | str | `"interleaved"` | Strategy (manual mode) |
| `seed` | int | `0` | Seed (manual mode) |
| `password` | str | `""` | Decryption password |
### Analysis
**`stegg_analyze`** — Analyze image for steganographic indicators. Returns per-channel chi-square anomaly scores and a verdict.
| Arg | Type | Default | Description |
|---|---|---|---|
| `image_path` | str | required | Image to analyze |
| `full` | bool | `false` | Run full 264-function analysis (PNG only) |
Verdict thresholds: `chi_square_indicator > 0.3` = HIGH, `> 0.1` = slight, else normal.
**`stegg_detect`** — Quick check for STEG v3 header presence.
**`stegg_capacity`** — Calculate how much data fits with given channel/bit settings.
**`stegg_analysis_tool`** — Run a specific analysis function by name. Use `stegg_list_analysis_tools` to see all 264+ available actions.
High-value analysis actions:
| Action | Detects |
| Tool | Purpose |
|---|---|
| `rs_analysis` | RS steganalysis — most sensitive LSB detector |
| `sample_pairs_analysis` | Complementary statistical approach to RS |
| `png_chi_square_analysis` | Chi-square on pixel value pairs |
| `png_bit_plane_analysis` | Visual attack on individual bit planes |
| `png_steg_signature_scan` | Known steg tool signatures (OpenStego, Steghide, etc.) |
| `png_detect_appended_data` | Data appended after IEND chunk |
| `detect_homoglyph_steg` | Unicode homoglyph substitution in text |
| `detect_unicode_steg` | Zero-width character steganography |
| `jpeg_decode` | JPEG-specific steg analysis |
| `audio_lsb_decode` | WAV audio LSB extraction |
| `stegg_encode` | Hide data in image via LSB. Key args: `image_path`, `payload_text`/`payload_file`, `channels`, `bits_per_channel`, `password` |
| `stegg_decode` | Extract hidden data. `auto_detect=true` reads config from header. Pass `password` for encrypted payloads |
| `stegg_analyze` | Chi-square anomaly detection per channel + verdict. `full=true` runs 264-function suite (PNG only) |
| `stegg_detect` | Quick STEG v3 header presence check |
| `stegg_capacity` | Calculate carrier capacity for given `channels` + `bits_per_channel` |
### Metadata Injection
**`stegg_inject_chunk`** — Inject PNG text chunks (tEXt, zTXt, iTXt, or 4-char private types).
**`stegg_read_chunks`** — Read all PNG chunks and extract text content.
**`stegg_inject_exif`** — Inject EXIF/metadata fields via PIL. Accepts `comment`, `author`, `description`, `title`, and `custom_fields` (JSON object).
| Tool | Purpose |
|---|---|
| `stegg_inject_chunk` | Inject PNG tEXt/zTXt/iTXt/private chunks |
| `stegg_read_chunks` | Read all PNG chunks + extract text content |
| `stegg_inject_exif` | Inject EXIF fields (`comment`, `author`, `description`, `title`, `custom_fields` JSON) |
### AI Red Team
**`stegg_injection_filename`** — Generate prompt-injection filenames designed to trigger LLMs into decoding steganographic content.
| Tool | Purpose |
|---|---|
| `stegg_injection_filename` | Generate prompt-injection filenames (templates: `chatgpt_decoder`, `claude_decoder`, `gemini_decoder`, `universal_decoder`, `system_override`) |
| `stegg_jailbreak_templates` | List jailbreak prompt templates for encoding as hidden payloads |
Templates: `chatgpt_decoder`, `claude_decoder`, `gemini_decoder`, `universal_decoder`, `system_override`, `roleplay_trigger`, `dev_mode`, `subtle`.
### Analysis Suite
**`stegg_jailbreak_templates`** — List jailbreak prompt templates that can be encoded as hidden payloads.
| Tool | Purpose |
|---|---|
| `stegg_analysis_tool` | Run a specific analysis function by name (e.g. `rs_analysis`, `sample_pairs_analysis`, `png_steg_signature_scan`) |
| `stegg_list_analysis_tools` | List all 264+ available analysis actions |
| `stegg_crypto_status` | Check AES-256-GCM availability |
### Utilities
Full argument tables and analysis action catalog in [REFERENCE.md](REFERENCE.md).
**`stegg_list_analysis_tools`** — List all 264+ analysis actions.
## Key Constraints
**`stegg_crypto_status`** — Check whether AES-256-GCM is available.
## Encoding Parameters
### Channel Presets
15 options: `R`, `G`, `B`, `A`, `RG`, `RB`, `RA`, `GB`, `GA`, `BA`, `RGB`, `RGA`, `RBA`, `GBA`, `RGBA`.
More channels = more capacity, more distortion.
### Bits Per Channel
| Bits | Visual Impact | Use Case |
|---|---|---|
| 1 (default) | Invisible to human eye | Covert operations, PoCs |
| 2-3 | Barely detectable | Good capacity/stealth tradeoff |
| 4+ | Visible artifacts | CTF, non-visual-fidelity scenarios |
### Strategies
| Strategy | Auto-Detect | Decode Needs | Status |
|---|---|---|---|
| `interleaved` (default) | Yes | Nothing extra | Working |
| `sequential` | No | Manual config | Working |
| `spread` | No | Manual config | Upstream decode bug |
| `randomized` | No | Manual config + seed | Upstream decode bug |
**Use `interleaved` unless you have a specific reason not to.** It is the only strategy where auto-detect works on decode.
- **Use `interleaved` strategy** (default). It is the only strategy where auto-detect works on decode.
- `spread` and `randomized` strategies have upstream decode bugs — encode works, decode fails.
- `sequential` works but requires manual config on decode (`auto_detect=false`).
- Full analysis mode (`full=true`) is PNG-only.
- All tools return JSON. Errors: `{"error": "description"}`.
## Workflows
@ -149,12 +81,12 @@ More channels = more capacity, more distortion.
### Detect Hidden Data in a Suspect Image
```
1. stegg_detect(image_path) → check for STEG v3 header
1. stegg_detect(image_path) → STEG v3 header?
2. stegg_analyze(image_path) → chi-square anomaly verdict
3. stegg_analysis_tool(image_path, "rs_analysis") → RS steganalysis
4. stegg_analysis_tool(image_path, "sample_pairs_analysis") → complement RS
5. stegg_read_chunks(image_path) → check for injected metadata
6. stegg_analyze(image_path, full=True) → full 264-function sweep (PNG only)
4. stegg_analysis_tool(image_path, "sample_pairs_analysis")
5. stegg_read_chunks(image_path) → injected metadata?
6. stegg_analyze(image_path, full=True) → full sweep (PNG)
```
### AI Red Team: Steganographic Prompt Injection
@ -172,26 +104,18 @@ More channels = more capacity, more distortion.
### Covert Data via PNG Chunks (No Pixel Modification)
```
1. stegg_inject_chunk(image, output, chunk_type="stEg",
keyword="", text="private chunk data")
2. stegg_inject_exif(image, output,
custom_fields='{"Software":"encoded payload"}')
3. stegg_read_chunks(output) → verify injection
1. stegg_inject_chunk(image, output, chunk_type="stEg", text="hidden")
2. stegg_inject_exif(image, output, custom_fields='{"Software":"payload"}')
3. stegg_read_chunks(output) → verify
```
## Error Handling
All tools return JSON. Errors are `{"error": "description"}` — never raw exceptions. Check for the `error` key before processing results.
## Installation
```bash
pip install stegg[mcp]
# or run directly:
cd /path/to/st3gg && uv run --extra mcp python3 mcp_server.py
```
MCP config for Claude Code / any MCP-compatible harness:
MCP config:
```json
{
"mcpServers": {