agentleFS
shoot16625shoot16625/note-cli/skills/my-stats/SKILL.md

my-stats

Skill2 starsChanged 9 days agoMITView on GitHub

The user's own note.com stats: views, likes, comments, sales, referrers.

  • Pipes a download into a shell

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the user's own note.com statistics through the unofficial API wrapper note-cli.

    line 8
  2. Very specific:

    If note-cli is on PATH, use it.

    line 14
  3. Very specific:

    If bun is missing, ask the user to install it (curl -fsSL https://bun.sh/install | bash).

    line 17
  4. Very specific:

    If not logged in, or on AUTH_ERROR, log in as described above.

    line 42
  5. Very specific:

    Use stats dashboard for the overview and stats chart to see whether a spike was one day or a trend.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

note-cli:my-stats

Read the user's own note.com statistics through the unofficial API wrapper note-cli. Requires login.

Running note-cli

This skill ships with the CLI. This file lives at <plugin root>/skills/<skill>/SKILL.md; the CLI is a dependency-free bundle at <plugin root>/dist/note-cli.js (requires Bun).

  • If note-cli is on PATH, use it.
  • Otherwise, if <plugin root>/dist/note-cli.js exists, run bun <plugin root>/dist/note-cli.js ... with the absolute path.
  • Otherwise (the skill was installed on its own, e.g. with npx skills add), ask the user before installing the CLI globally with bun add -g github:shoot16625/note-cli, then use note-cli.
  • If bun is missing, ask the user to install it (curl -fsSL https://bun.sh/install | bash). Below, note-cli means whichever of these works.

Output is JSON on stdout. Errors are JSON on stderr ({"error": {"code", "message"}}) with exit code 1 (2 for usage errors). Codes: NOT_LOGGED_IN, AUTH_ERROR, NOT_FOUND, RATE_LIMITED, API_ERROR, USAGE.

Login (only for commands that need it)

note-cli auth status tells you whether a session exists. To log in, run note-cli auth login yourself with a command timeout of at least 300 seconds. It opens a Chrome/Edge/Chromium window on the note.com login page and waits for the user to finish logging in there. Tell the user to log in in that window. Never ask for their password. If no browser is found, pass --browser <path>, or have the user copy the Cookie request header (or just the _note_session_v5 value) from DevTools and pipe it to note-cli auth import.

Commands

note-cli auth status                                  # who is logged in
note-cli stats dashboard [--period 7d|28d|365d|all|this-month|last-month] [--order pv|impressions|likes|comments|sales|published] [--limit 20]
                                                      # totals, referrers and per-article numbers for the period (default 28d)
note-cli stats dashboard --period custom --from 2026-10-01 --to 2026-10-31
note-cli stats chart --metric pv|impressions|likes|comments|sales --period 28d   # one metric over time
note-cli stats pv --filter all|daily|weekly|monthly|yearly --sort pv|like|comment --page 1
note-cli analyze user <own urlname> --limit 100       # likes/title/timing breakdown of own posts
note-cli draft list                                   # own articles incl. drafts

stats dashboard is the same data as note's dashboard page: totals (pageViews, impressions, likes, comments, sales in yen), referrers (where readers came from: note.com, search engines, X, ChatGPT, ...) and notes with the same numbers per article. Impressions are null before May 2021. lastUpdatedAt says how fresh the numbers are (note updates them about daily). --limit 0 skips the per-article list.

stats pv returns note's older raw response (per-article read_count, likes, comments plus totals). It is page-based (--page N); the response shape is unofficial, so inspect it before summarizing.

If not logged in, or on AUTH_ERROR, log in as described above.

Reporting

  • Lead with the totals for the period, then the top 5 articles by views, then anything surprising (high views but few likes, etc.).
  • Combine with analyze user to relate performance to title style and posting time; flag small samples.
  • Use stats dashboard for the overview and stats chart to see whether a spike was one day or a trend. Compare impressions to page views (click-through) and point out referrers that grew.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.