config/agents/skills/context-efficiency/SKILL.md
Filter data at the source before it enters context. Use when querying APIs, CLIs, or databases where the full output would be large. Prefer structured output + jq/python filtering over dumping and scanning. Trigger phrases: "find the entity for", "get the ID of", "which service handles", "what's the value of", or any time you'd otherwise dump a large dataset to find one thing.
npx skillsauth add edmundmiller/dotfiles context-efficiencyInstall 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.
Every token of noise in context is a token the model spends navigating instead of reasoning. Spend a few tokens on a precise query; save many on the backend.
Does the tool support structured output? (--json, -o json, --format json)
├─ Yes → use it, then pipe to jq or python3 -c
└─ No → use grep/awk to pre-filter, or hit the raw API with query params
# Get one field from an array of objects
tool -o json | jq -r '.[0].field'
# Filter array by condition
tool -o json | jq '[.[] | select(.state == "on")]'
# Case-insensitive name search
tool -o json | jq -r '.[] | select(.attributes.friendly_name | test("couch"; "i")) | .entity_id'
# Count by group
tool -o json | jq 'group_by(.state) | map({state: .[0].state, count: length})'
# Pluck two fields
tool -o json | jq -r '.[] | [.entity_id, .state] | @tsv'
# Count by state
tool -o json | python3 -c "
import json, sys; d = json.load(sys.stdin)
from collections import Counter; print(Counter(x['state'] for x in d))
"
# Find matching entity
tool -o json | python3 -c "
import json, sys; d = json.load(sys.stdin)
print(next(x['entity_id'] for x in d if 'couch' in x['attributes'].get('friendly_name','').lower()))
"
hass-cli -o json state list 'light.*' | jq -r '.[] | select(.state=="on") | .entity_id'
hass-cli -o json area list | jq -r '.[] | [.area_id, .name] | @tsv'
hass-cli -o json device list | jq '[.[] | select(.area_id == "kitchen")]'
gh pr checks 42 --json name,state | jq -r '.[] | select(.state=="FAILURE") | .name'
gh issue list --json number,title,labels | jq '[.[] | select(.labels[].name == "bug")]'
gh api repos/:owner/:repo/pulls --jq '.[].head.ref'
nix eval .#nixosConfigurations.nuc.config.environment.systemPackages --json | jq -r '.[].name' | grep hass
-- Always: WHERE + LIMIT over SELECT *
SELECT entity_id, state FROM states WHERE domain = 'light' ORDER BY last_changed DESC LIMIT 20;
# ❌ dumps hundreds of entities to find one
hass-cli state list
# ✅ returns exactly what you need
hass-cli -o json state list 'light.*' | jq -r '.[] | select(.attributes.friendly_name | test("desk"; "i")) | .entity_id'
# ❌ loads full PR list into context
gh pr list
# ✅ targeted
gh pr list --json number,title --jq '.[] | select(.title | test("fix"; "i"))'
development
Read-only Linear issue access via the Linear GraphQL API.
data-ai
## <!-- Purpose: Teach agents fast day-to-day memory browse/search/read/sync workflows in pi-context-repo. --> name: searching-memory description: > Search, browse, and inspect memory quickly in pi-context-repo. Use when asked to find prior notes, inspect memory files, locate preferences, or sync recent memory updates. Trigger phrases: "search memory", "list memory files", "find in memory", "read memory file", "memory status", "sync memory". --- # Searching Memory Use this workflow for fast
development
Comprehensive guide for initializing or reorganizing agent memory into a deeply hierarchical file structure. Use when running /init, when user asks to set up memory, or when memory needs a major reorganization. Trigger phrases: "initialize memory", "set up memory", "populate memory", "build my memory", "memory init".
data-ai
Decomposes and reorganizes agent memory files into focused, single-purpose components. Use when memory has large multi-topic blocks, redundancy, or poor organization. Trigger phrases: "defrag memory", "reorganize memory", "clean up memory files", "split memory blocks".