agent/skills/knowledge/io-wrapper/SKILL.md
Wrap file-like objects with read/write counters. Use when implementing IO wrappers, tracking file access, or counting bytes read/written through a proxy.
npx skillsauth add knoopx/pi io-wrapperInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
To wrap a file-like object and count reads/writes.
Thread safety: if the test uses threads, wrap counter updates in a threading.Lock.
class MetaRead:
def __init__(self, wrapped): self._wrapped = wrapped; self.nreads = 0
def read(self, size=-1):
data = self._wrapped.read(size)
self.nreads += len(data) # count returned bytes, not requested
return data
tools
Inform the user what is happening — skip passive lookups
development
Renders markdown to self-contained HTML with a custom dark stylesheet and opens in browser. Use when previewing markdown documents, generating styled HTML from README or report files.
testing
Programmatic hunk selection for Jujutsu — split, commit, or squash specific hunks without interactive prompts. Use when making partial commits or selective squashes.
content-media
Manage version control with Jujutsu (jj) — no staging area, immediate changes, smart rebasing. Use when navigating history, squashing, or pushing to Git remotes.