- Home
- Skills
- Workflow Automation
- SafeDrain
Works with the AI Agents you already use
SafeDrain
SafeDrain helps AI coding agents manage usage quotas, prevent task failures, and safely checkpoint work before quota exhaustion.
Free
SafeDrain
Example session with this skill installed
Real SafeDrain Example Session — Repository Audit
Perform a real, read-only directory and repository audit suitable for inclusion as a public example session on Agensi.
This must be a genuine execution using real tools, actual files, and native usage readings. Do not simulate agent activity, usage readings, tool outputs, or SafeDrain decisions.
SafeDrain policy
Explicitly invoke the installed $safe-drain skill
for this real audit session.
Verify that SKILL.md was actually loaded and that
native quota telemetry is available.
Use genuine usage readings throughout the session.
Do not simulate SafeDrain activation or quota changes.
5-hour remaining:
- CAUTION <=25%
- DRAIN <=20%
- HARD DRAIN <=15%
Weekly remaining
- CAUTION <=5%
- DRAIN <=3%
- HARD DRAIN <=2%
Treat both windows independently; the most restrictive condition wins.
Obtain fresh native usage readings at admission and at appropriate material boundaries. Obtain a final reading if the native capability is available.
Do not manufacture threshold crossings or artificially consume quota to demonstrate SafeDrain.
Use normal work admission, conservative projected costs, and recovery reserves. Parallel work is permitted when independent and safely bounded. Do not require parallelism for this small audit.
Target
Public repository
https://github.com/rza255/safedrain
Release: v1.0.0
Use an existing verified checkout or clone the public repository into a new, isolated temporary directory.
Verify the actual repository identity and release commit before proceeding. If the repository is unavailable, report the blocker instead of substituting another target.
Audit
Perform a real, bounded audit of the repository:
- Inspect the directory structure and inventory tracked files.
- Check for missing or unexpectedly large files.
- Verify that SKILL.md, LICENSE, and relevant release documentation are present.
- Inspect relative links and referenced local files for obvious missing targets.
- Check for unintentionally included credentials, private keys, or sensitive configuration filenames, without exposing any secret values.
- Verify the working tree remains unchanged.
- Report actual findings, including a clean result if no issues are found.
Use native filesystem and Git commands. Keep reads and searches targeted.
Do not modify repository files or implement fixes.
Evidence and presentation
At completion, produce a concise, publication-ready Markdown session transcript containing:
- Original task and actual environment
- SafeDrain capability activation evidence, if observed
- Initial native quota readings
- Key real commands and relevant outputs
- Audit findings supported by actual file evidence
- Material SafeDrain decisions and subsequent readings
- Final repository status
- Final outcome
Preserve actual values. Do not invent intermediate quota observations or claim a threshold was reached when it was not.
Clearly distinguish measured facts from estimates.
Omit unnecessary personal filesystem paths, usernames, credentials, and account identifiers from the public-facing transcript. Redact sensitive values rather than displaying them.
Keep the original execution evidence available for verification.
Finish the audit and STOP. Do not start unrelated tasks.
- Read your context and instructions
- Compiled the safedrain
- Generated the document
Real SafeDrain session — repository audit
[Certain] The published v1.0.0 release still describes itself as unreleased. The bounded audit otherwise found all tracked files present, all checked local file references resolving, and no credential indicators.
[Certain]
Original task: “Perform a real, read-only directory and repository audit suitable for inclusion as a public example session on Agensi.” Target: rza255/safedrain, release v1.0.0. Required checks covered inventory, missing or large files, skill/license/release documentation, local references, credential indicators, and unchanged repository state. No fixes or publication were requested.
[Certain]
Actual environment: Codex desktop on Windows, OS description Microsoft Windows 10.0.26200; PowerShell 7.6.5; Git 2.56.0.windows.2; ripgrep 15.2.0. Execution date: 15 October 2026, Europe/Paris. A new isolated temporary clone was used. Below, $AUDIT and $SKILL replace personal absolute paths; command excerpts preserve the actual operations.
[Certain]
SafeDrain activation evidence: The agent explicitly invoked $safe-drain and loaded the installed plugin cache’s safe-drain/1.0.0/skills/safe-drain/SKILL.md using Get-Content -LiteralPath. Its SHA-256 was:
FE07DF0E8ED17AAFA1B9F2A9DABF14F44138CBA2025E531B5267F09E88C97159
[Certain] The loaded file was 7,186 bytes; the release’s skill was 7,036 bytes. A direct comparison after CRLF/LF normalization returned EqualAfterNewlineNormalization: true. Activation evidence consists of the file read and the applied policy decisions; no automatic activation event was observed.
[Certain] Native mcp__codex_app__get_usage_limits returned ordinaryUsageAllowed: true and a codex limit bucket with 300-minute and 10,080-minute windows. All readings below came from actual calls. Remaining percentages are calculated as 100 minus native usedPercent.
| Boundary | Paris time | 5h used / remaining | Weekly used / remaining |
|---|---|---|---|
| Admission | Not separately timestamped | 67% / 33% | 46% / 54% |
| Release verification | 01:12:35 | 68% / 32% | 46% / 54% |
| Inventory and document inspection | 01:12:50 | 68% / 32% | 46% / 54% |
| Reference and credential checks | 01:13:29 | 69% / 31% | 46% / 54% |
| Repository verification | 01:14:01 | 69% / 31% | 46% / 54% |
| Final reading | 01:14:33 | 70% / 30% | 46% / 54% |
[Certain] Policy thresholds were evaluated independently: 5h CAUTION ≤25%, DRAIN ≤20%, HARD DRAIN ≤15%; weekly CAUTION ≤5%, DRAIN ≤3%, HARD DRAIN ≤2%. The most restrictive triggered state would govern. Neither window triggered a threshold in any observed reading.
[Guessing] Admission estimates allowed up to 3 percentage points of 5h quota and 1 weekly point for the audit, with recovery reserves of 2 and 1 points. Recent burn was initially unknown, so release verification was followed by a fresh reading. Later observed intervals changed by 0–1 point in the 5h window and 0 weekly points. Retaining checks after each bounded batch left the projected next unit above CAUTION and preserved the reserves. These were conservative planning judgments, not measured operation costs.
[Certain] Repository identity and release evidence — command/output excerpts:
git ls-remote --exit-code https://github.com/rza255/safedrain.git 'refs/tags/v1.0.0' 'refs/tags/v1.0.0^{}'
git -c credential.helper= -c core.autocrlf=false clone --depth 1 --branch v1.0.0 --single-branch https://github.com/rza255/safedrain.git "$AUDIT/repo"
git remote get-url origin
git rev-parse HEAD
git rev-parse 'refs/tags/v1.0.0^{commit}'
a87c6fab19271c7fc9c5d284c26731bb8abbe9b0 refs/tags/v1.0.0
71d5a22a43d308e8d922e7e15cce29de3ba4d9b1 refs/tags/v1.0.0^{}
https://github.com/rza255/safedrain.git
71d5a22a43d308e8d922e7e15cce29de3ba4d9b1
71d5a22a43d308e8d922e7e15cce29de3ba4d9b1
[Certain] Git checked out detached HEAD at the annotated tag’s peeled commit. The public GitHub release API was also read with Invoke-RestMethod:
{
"html_url": "https://github.com/rza255/safedrain/releases/tag/v1.0.0",
"tag_name": "v1.0.0",
"name": "SafeDrain v1.0.0",
"draft": false,
"prerelease": false,
"published_at": "2026-09-29T17:21:34Z",
"target_commitish": "71d5a22a43d308e8d922e7e15cce29de3ba4d9b1"
}
[Certain]
Inventory: git ls-files --stage, Get-Item, and Get-FileHash -Algorithm SHA256 identified eight tracked regular files, totaling 1,080,874 bytes:
| Tracked path | Bytes |
|---|---|
| CHANGELOG.md | 3,824 |
| LICENSE | 1,070 |
| README.md | 13,068 |
| assets/safedrain.png | 1,023,137 |
| docs/SUBMISSION_TESTS.md | 11,567 |
| docs/VALIDATION.md | 18,871 |
| plugin.json | 2,301 |
| skills/safe-drain/SKILL.md | 7,036 |
[Certain] No tracked file was missing or empty; none exceeded 1 MiB. The only file above the separate 512 KiB review cutoff was the documented branding PNG. Its signature was 89-50-4E-47-0D-0A-1A-0A, and its IHDR dimensions were 1,254 × 1,254, matching README.md:300–303. This header check did not perform a full image decode. The expected directories were assets/, docs/, and skills/safe-drain/. The skill, MIT license, changelog, README, validation notes, and submission scenarios were present.
[Certain]
Reference and credential checks: A saved PowerShell audit script used native filesystem commands, regular expressions, Select-String, and JSON manifest parsing. It checked six relative Markdown file links and both manifest image fields:
README.md:221 docs/VALIDATION.md True
README.md:289 docs/SUBMISSION_TESTS.md True
README.md:300 assets/safedrain.png True
README.md:336 LICENSE True
docs/SUBMISSION_TESTS.md:5 VALIDATION.md True
docs/VALIDATION.md:453 SUBMISSION_TESTS.md True
plugin.json logo ./assets/safedrain.png True
plugin.json composerIcon ./assets/safedrain.png True
[Certain] Results: MissingLocalReferences: 0, SensitiveFilenames: [], CredentialIndicatorHits: [], ContentScanFiles: 8. Patterns covered private-key headers, common provider token formats, quoted credential assignments, credential-bearing URLs, and sensitive filenames such as environment files, key stores, and credential files. Only hit locations and rule names would have been printed. Installation destinations and hypothetical test-workspace files such as HANDOFF.md were treated as contextual references.
[Certain] This was a bounded tracked-content scan; it did not certify the absence of every possible secret or inspect full Git history. External link availability and Markdown anchor correctness were outside the local-file check.
[Certain]
Finding — stale release documentation: README.md:14–18, CHANGELOG.md:3–12, and docs/VALIDATION.md:432,456–457 retain candidate/unreleased wording. The changelog says no tag or release has occurred, despite the verified published release. No repository files were changed.
[Certain] Final verification — commands and measured results:
git --no-optional-locks status --porcelain=v1 --untracked-files=all
git --no-optional-locks diff --exit-code
git --no-optional-locks diff --cached --exit-code
git fsck --no-reflogs
HashDifferences: 0
GitBlobMismatches: []
FinalStatusLines: 0
UnstagedDiffExit: 0
StagedDiffExit: 0
GitFsckExit: 0
HEAD: 71d5a22a43d308e8d922e7e15cce29de3ba4d9b1
[Certain] Every tracked file’s final SHA-256 matched its baseline; git hash-object --no-filters also matched each HEAD blob. A subsequent final status check again emitted no status lines.
[Certain]
Outcome: Audit completed with one release-documentation inconsistency and a clean working tree. Native remaining quota moved from 33% to 30% over 5 hours and stayed at 54% weekly. These shared-account readings cannot attribute consumption exclusively to this audit, and unchanged rounded percentages do not prove zero consumption. No threshold crossing, drain action, simulated activity, or deliberate quota consumption was used.
[Certain] The isolated checkout, loaded skill copy, audit script, hash inventories, reference results, GitHub release response, and private command/native-response records remain available locally for verification. Personal paths and account identifiers are omitted from this public transcript. Work stopped after the audit and evidence preparation.
safedrain.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
SafeDrain is a small behavioral skill for long-running or quota-sensitive Codex and agent tasks. It teaches the active agent to query native runtime usage information proactively, evaluate each quota window against user-supplied session thresholds, adapt both usage-check cadence and work-unit size as pressure rises, and checkpoint before starting work projected to reach drain. Native Capability First: SafeDrain supplies instructions, not quota telemetry or a background monitor. It requires an agent-queryable native usage capability and an existing project recovery mechanism. Naturalistic validation supports the documented behavior; it does not establish universal reliability or the ability to interrupt an operation that never returns control.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 5 days ago
- Free to download with an account