agentleFS
npxcnency-uxnpxcnency-ux/da-agent/skills/analyze-request/SKILL.md

analyze-request

Skill0 starsChanged 8 months agoMITView on GitHub

Understand user's analysis request through structured dialog, score complexity, and route to appropriate execution mode. Use when user wants to analyze data.

  • Reads credentials
  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If user provides forbidden path, respond: "Sorry, for security reasons, I can only access files within the current project directory."

    line 31
  2. Distinctive:

    Ask questions ONE AT A TIME to clarify the request.

    line 38
  3. Very specific:

    Use question templates from references/question-templates.md.

    line 40
  4. Distinctive:

    If security validation fails → Explain why and ask for different path

    line 120
  5. Distinctive:

    If complexity scoring fails → Fall back to rule-based scoring

    line 121
  6. Distinctive:

    If user provides incomplete info → Ask follow-up questions

    line 122
  7. Distinctive:

    If task is too vague → Help decompose into specific questions

    line 123

≈ “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

Analyze Request Skill

Request understanding and routing for DA-Agent

Purpose

Transform vague business requests into structured analysis tasks, score complexity, and route to the appropriate execution mode.

Security Constraints

CRITICAL: Before any file operation, validate paths:

from lib.security_wrapper import SecureFileAccess

security = SecureFileAccess(os.getcwd())
safe_path = security.validate_path(user_provided_path)

Never access:

  • Files outside current working directory
  • .env files
  • Credential files
  • .ssh directories

If user provides forbidden path, respond: "Sorry, for security reasons, I can only access files within the current project directory."

Workflow

Phase 1: Structured Dialog

Ask questions ONE AT A TIME to clarify the request. Use multiple choice when possible.

Use question templates from references/question-templates.md.

Required information:

  1. Core question - What business question are we answering?
  2. Data sources - Which files? (validate with security wrapper)
  3. Time range - What period?
  4. Dimensions - How to slice the data?
  5. Analysis type - What kind of analysis?

Phase 2: Complexity Scoring

Once you have structured requirements, score complexity:

from lib.complexity_scorer import ComplexityScorer

scorer = ComplexityScorer()
result = scorer.score(structured_req)

print(f"Complexity Score: {result.score}/10")
print(f"Suggested Mode: {result.mode}")
print(f"Reasoning: {result.reasoning}")

See references/complexity-scoring-rubric.md for scoring criteria.

Phase 3: User Confirmation

Present the scoring result and ask for confirmation:

Example:

Analysis Task Complexity

Score: 5/10 Suggested Mode: Collaborative Reasoning: Multi-file JOIN (2pts) + Funnel analysis (2pts) + Business rules (1pt)

In collaborative mode:

  • I'll generate code drafts for your review
  • You'll approve at key decision points
  • We'll work together on the analysis

Proceed with this approach?

Phase 4: Route to Execution

Based on confirmed mode:

  • auto → Load execute-auto skill and hand off
  • collab → (Phase 2: Coming soon)
  • assist → (Phase 2: Coming soon)

For auto mode:

# Hand off to execute-auto skill
print("Routing to auto-execution mode...")
# The execute-auto skill will take over from here

Then follow the execute-auto skill workflow.

Phase 5: Knowledge Base Recording

Save the task to knowledge base:

from lib.knowledge_store import KnowledgeStore
import os

kb = KnowledgeStore(Path.home() / ".da-agent" / "knowledge")
task_id = kb.save_task(
    description=original_request,
    structured_req=structured_req,
    complexity_score=result.score,
    execution_mode=result.mode
)

Error Handling

  • If security validation fails → Explain why and ask for different path
  • If complexity scoring fails → Fall back to rule-based scoring
  • If user provides incomplete info → Ask follow-up questions
  • If task is too vague → Help decompose into specific questions

Examples

See references/question-templates.md for conversation flow examples.

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.