AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Ai System Review

skill-manastalukdar-ai-devstudio-ai-system-review · by manastalukdar

Review LLM application code for context assembly quality, retrieval integration, prompt construction, output validation, cost controls, and failure handling

No reviews yet
0 installs
16 views
0.0% view→install

Install

$ agentstack add skill-manastalukdar-ai-devstudio-ai-system-review

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-manastalukdar-ai-devstudio-ai-system-review)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Ai System Review? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

AI System Review

Evaluate LLM-powered application code for reliability, quality, and cost. Covers context assembly, retrieval pipelines (RAG), prompt design, output validation, error handling, and spend controls.

Usage

/ai-system-review                 # review staged changes
/ai-system-review           # review a specific directory or file
/ai-system-review --prompts       # focus only on prompt quality
/ai-system-review --costs         # focus only on token cost controls

Behavior

Step 1 — Map the LLM system boundary

# Find model client calls
grep -rn "openai\|anthropic\|bedrock\|vertexai\|litellm\|langchain\|llamaindex" \
  --include="*.ts" --include="*.py" --include="*.js" -l . | head -20

# Find prompt templates
find . -name "*.txt" -o -name "*.md" -o -name "*.jinja" | xargs grep -l "{{.*}}\|\${.*}\|\|" 2>/dev/null | head -10

Step 2 — Review context assembly

Check how context is built before each LLM call:

| Concern | What to look for | Risk | |---|---|---| | Context window overflow | No token counting before call | Truncation silently corrupts prompt | | Injection risk | User input concatenated directly into system prompt | Prompt injection | | Stale context | No timestamp or recency check on retrieved chunks | Outdated information presented as current | | Missing metadata | Retrieved chunks lack source / date | Hallucination is unverifiable | | Token waste | Entire documents passed when only sections needed | Unnecessary cost |

Step 3 — Review retrieval pipeline (if RAG)

grep -rn "similarity_search\|retrieve\|vectorstore\|embed\|chromadb\|pinecone\|weaviate\|qdrant" \
  --include="*.ts" --include="*.py" -l . 2>/dev/null

Check:

  • Chunking strategy: Fixed-size vs semantic; chunk size vs model context window
  • Retrieval quality signals: Is score / distance checked before including chunks?
  • Top-k threshold: Hard cap on retrieved chunks regardless of relevance score?
  • Re-ranking: Any cross-encoder re-ranking before context assembly?
  • Hybrid search: BM25 + dense retrieval or dense-only?

Step 4 — Review prompt construction

For each prompt template:

  • System prompt scope: Is it the minimum necessary? Bloated system prompts cost on every call.
  • Few-shot examples: Are they hardcoded or dynamically selected? Hardcoded examples may be irrelevant.
  • Output format instructions: Does the prompt specify JSON/structured output? Is it enforced with tool use / response format?
  • Role separation: System vs user vs assistant boundaries respected?
  • Instruction conflict: Contradictory instructions in system + user turns?

Step 5 — Review output validation

grep -rn "JSON.parse\|json.loads\|parse\|validate\|schema\|zod\|pydantic" \
  --include="*.ts" --include="*.py" -l . 2>/dev/null | head -10

Check:

  • Is LLM output parsed and validated before use?
  • Is there a fallback when output is malformed?
  • Are numeric/boolean outputs range-checked?
  • For agentic workflows: are tool call results validated before passing back to model?

Step 6 — Review cost controls

grep -rn "max_tokens\|maxTokens\|stream\|usage\|cost\|budget" \
  --include="*.ts" --include="*.py" -l . 2>/dev/null | head -10

Check:

  • max_tokens / max_completion_tokens set on every call?
  • Streaming used for long outputs (reduces TTFB)?
  • Token usage logged per request?
  • Monthly spend cap or alert configured?
  • Caching for repeated identical prompts (cache_control, prompt_caching)?

Step 7 — Review error handling

  • What happens when the LLM API returns 429 (rate limit)?
  • What happens on 500 or timeout?
  • Is there a retry with exponential backoff?
  • Does the application surface a graceful degradation to the user?

Step 8 — Report findings

AI SYSTEM REVIEW — 

Context Assembly (2 issues)
  src/chat/context.py:34   No token counting — long conversations will silently truncate
  src/search/rag.py:78     User query concatenated directly into system prompt (injection risk)

Retrieval (1 issue)
  src/rag/retriever.py:55  Retrieved chunks used regardless of similarity score — low-relevance
                           context degrades answer quality

Prompt Quality (2 issues)
  prompts/system.txt       System prompt is 1,800 tokens — costs $0.002/call at current volume
  prompts/extract.txt      No structured output format specified — JSON parsing will fail intermittently

Output Validation (1 issue)
  src/api/handler.py:92    LLM JSON parsed with json.loads, no schema validation — malformed
                           output propagates to downstream service

Cost Controls (2 issues)
  src/llm/client.py        No max_tokens set — runaway responses possible
  No prompt caching         Repeated system prompt costs money on every call (enable cache_control)

Error Handling (1 issue)
  src/llm/client.py:18     No retry logic — single API error returns 500 to user

Edge Cases

  • Multiple providers: Check each client independently; flag inconsistent error handling across providers.
  • Agentic / multi-step: Trace the full loop — check that tool results are validated before re-entry.
  • Streaming: Verify error handling works mid-stream (not just at call start).
  • No RAG: Skip Step 3 and note it was not applicable.

Token Optimization

Expected range: 500–2,000 tokens (grep-driven analysis); 200–400 tokens (single-focus mode with --prompts or --costs)

Patterns used: Grep-before-Read, git diff scope, progressive disclosure, early exit

Early exit: If no LLM client imports detected in the target path, report "No LLM integration found" and exit.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.