Agent skill · Databases

self-awareness

Claude Science's own session database schema and SDK surface for introspection via host.query(). Load this when you need to query your own conversation history, token usage, cost accounting, execution log, or artifact metadata beyond what host.frames()/host.artifacts() provide — e.g. "how many tokens has this session used", "what was my last tool call", "list every file I've written", "where are messages stored", "what tables can I query", "inspect frames.context_data", or any time you're about to PRAGMA-probe the Claude Science metadata DB to discover its schema.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill self-awareness --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 13 KB
Bundled scripts: none
Path: skills/claude-science/self-awareness/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Self-awareness — Claude Science's own database and SDK `host.query(sql, params=[], limit=None, df=False)` runs read-only SQLite against Claude Science's own metadata DB. It is only available via the **`repl` tool** (not `python`/`r`). Results are automatically scoped to the current project, so `SELECT * FROM frames` returns only frames in this project. The `repl` tool is stdlib-only — `df=True` returns the raw dict there (use `json.dump(..., open("handoff/q.json","w"))` and load in a `python` cell if you want pandas). ## Dialect and limits - **SQLite.** Epoch-milliseconds for all timestamps (`created_at > strftime('%s','now','-1 day')*1000`). Booleans are `0`/`1`. JSON columns are TEXT — use `json_extract(col, '$.key')`. Recursive CTEs OK. - `SELECT` / `WITH` / `PRAGMA` / `EXPLAIN` only; one statement per call; `?` placeholders with `params=[...]`. - **Scoping.** Most tables are transparently filtered to the current project (and `memories` to the current user) via CTEs that shadow the real tables — `session_claims`, `verification_checks`, and `poller_lease` are unscoped. You therefore **cannot** use `main.table` / `temp.table` — schema-qualified names are rejected. - **Caps.** De

What's inside
Steps it walks through
  1. Dialect and limits
  2. Queryable tables
  3. Session / conversation
  4. Artifacts
  5. Execution history
  6. Compute and verification
  7. Denied tables
  8. Worked examples
  9. SDK surface — which tool runs what
More from awesome-bio-agent-skills
All skills →
About this skill
What does the self-awareness skill do?

Claude Science's own session database schema and SDK surface for introspection via host.query(). Load this when you need to query your own conversation history, token usage, cost accounting, execution log, or artifact metadata beyond what host.frames()/host.artifacts() provide — e.g. "how many tokens has this session used", "what was my last tool call", "list every file I've written", "where are messages stored", "what tables can I query", "inspect frames.context_data", or any time you're about to PRAGMA-probe the Claude Science metadata DB to discover its schema.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill self-awareness --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going