setup-analysis

A setup command for a log-analysis project that installs its Python dependencies, prepares a placeholder for the Gemini API key, and excludes analysis output from Git.

In plain words
What is it for?
Use it when preparing the log-analysis pipeline on a local machine, including checking requirements.txt, installing packages, configuring .env, and adding analysis/ to .git/info/exclude.
Why use it?
It collects the initial setup steps in one repeatable procedure and stops when required files, Python, or dependency installation are missing or fail.

Command for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/laaibaqasim/productivity-kit/setup-analysis
Clone the repo
git clone --depth 1 https://github.com/laaibaQasim/productivity-kit

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 514 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00514
Opus 5 $0.00000 $0.00257
Sonnet 5 $0.00000 $0.00103
Haiku 4.5 $0.00000 $0.00051

Measured 2d ago against content hash d4a6dfdc07f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/commands/setup-analysis.md · 53 lines

What it actually says

Setup the log-analysis module.

description: >- Initialize log-analysis: install Python requirements, check GEMINI_API_KEY, add analysis/ to .git/info/exclude.

Setup — log-analysis

One-time local setup for the log-analysis pipeline.

Follow this exact flow:

  1. Verify prerequisites:

    • Confirm log-analysis/requirements.txt exists. If it does not, stop and report the missing file.
    • Check that python or python3 is on the PATH. If neither is found, stop and tell the user Python 3.9+ is required.
  2. Install Python dependencies:

    • Run: pip install -r log-analysis/requirements.txt
    • If pip is unavailable, try pip3.
    • If installation fails, report the error and stop.
  3. Check for .env and GEMINI_API_KEY:

    • If .env does not exist, create it with this exact content:
      GEMINI_API_KEY=your_key_here
      
    • If .env exists but does not contain GEMINI_API_KEY, append GEMINI_API_KEY=your_key_here on a new line.
    • If .env already contains GEMINI_API_KEY, leave it unchanged.
    • Remind the user to replace your_key_here with a real key from https://aistudio.google.com/app/apikey.
  4. Add analysis/ to .git/info/exclude:

    • Only do this if a .git/ directory exists in the repo root.
    • Ensure .git/info/ exists.
    • If analysis/ is not already in .git/info/exclude, append it.
    • This keeps generated output files out of git without modifying the shared .gitignore.
  5. Provide a concise summary that includes:

    • Whether pip install succeeded
    • Whether .env was created, updated, or already correct
    • Whether .git/info/exclude was updated
    • The command to run the pipeline (shown verbatim):
      python log-analysis/log_analysis.py prepare
      python log-analysis/log_analysis.py run-all --out-dir analysis
      

Rules:

  • Do not use sudo.
  • Do not touch files outside this repository.
  • Never overwrite an existing .env key value.
  • If this is not a git repo, skip the exclude-file step and say so.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 53 lines · 0 tokens per session scan A d4a6dfdc07f5

Subscribe to this mod's changes

setup-analysis is a command published in the GitHub repository laaibaQasim/productivity-kit (4 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 514 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.