agentleFS
kobaltgitkobaltgit/StatCraft/.agents/skills/statcraft-assistant/SKILL.md

statcraft-assistant

Skill53 starsChanged 4 days agoApache-2.0View on GitHub

Interact with the StatCraft statistical computing application via the Code Mode MCP bridge for SPSS syntax execution, dataset manipulation, variable metadata auditing, and reporting.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Instead of issuing dozens of slow, fragmented micro-tools, agents use batch SPSS syntax (statcraft_run_syntax) or direct tabular loading …

    line 14
  2. Very specific:

    Run HELP. to see the entire directory of supported categories and commands.

    line 18
  3. Very specific:

    Run HELP <COMMAND>. (e.g. HELP ONEWAY., HELP T-TEST.) to get the exact syntax template and available subcommands.

    line 19
  4. Very specific:

    If a command is misspelled, the syntax parser returns a "Did you mean ...?" suggestion.

    line 21
  5. Very specific:

    Inspect Data: Call statcraft_list_variables or statcraft_get_data_preview.

    line 80
  6. Very specific:

    Consult Syntax if Needed: Run HELP <COMMAND>. via statcraft_run_syntax to verify available subcommands.

    line 81
  7. Distinctive:

    Interpret Output: Read the returned ASCII ANOVA and Descriptives tables directly from the tool response.

    line 87

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

StatCraft Assistant Skill (Autonomous Code Mode)

This skill enables AI agents to control and inspect the active StatCraft desktop application session using an autonomous Code Mode (SPSS-syntax REPL).


1. Code Mode REPL Architecture

Instead of issuing dozens of slow, fragmented micro-tools, agents use batch SPSS syntax (statcraft_run_syntax) or direct tabular loading (statcraft_load_dataset).

  • Instant Output Return: statcraft_run_syntax directly returns the ASCII/Unicode tabular output (Pivot Tables) of all generated procedures (ANOVA, Descriptives, Frequencies, T-Tests, Regression, Reliability) in the tool response! The agent immediately sees means, degrees of freedom, test statistics, and exact $p$-values in its context.
  • Self-Correction & Dynamic Self-Documentation: The compiled StatCraft binary is the single source of truth:
    • Run HELP. to see the entire directory of supported categories and commands.
    • Run HELP <COMMAND>. (e.g. HELP ONEWAY., HELP T-TEST.) to get the exact syntax template and available subcommands.
    • Or inspect the dynamic MCP resource statcraft://syntax-reference.
    • If a command is misspelled, the syntax parser returns a "Did you mean ...?" suggestion.

2. Tools Reference

1. statcraft_run_syntax (Primary Batch Execution Engine)

Executes a batch SPSS syntax script (.sps) in StatCraft and returns formatted result tables.

  • Parameters:
    • syntax (string, required): Full SPSS syntax script. Each command MUST end with a period (.).
    • timeout_seconds (integer, optional): Timeout in seconds (default: 45, max: 300).
  • Universal Code Mode Directive:
    • Any core command can be directly invoked in syntax via: RUN COMMAND "<command_id>" { <json_params> }. Example: RUN COMMAND "transform.shift_values" { "source_var": "salary", "target_var": "salary_lag", "direction": "lag", "step": 1 }.
  • Core Procedures:
    • Self-Documentation: HELP. or HELP <COMMAND>. (e.g. HELP ONEWAY.).
    • Variable Properties:
      • VARIABLE LEVEL varlist (SCALE | ORDINAL | NOMINAL).
      • VARIABLE LABELS var 'Descriptive Label'.
      • VALUE LABELS var 1 'Male' 2 'Female'.
      • MISSING VALUES var (99, 999).
    • Transformations: COMPUTE target = expr., SORT CASES BY var (A)., SPLIT FILE BY var., FILTER BY var., WEIGHT BY var.
    • Statistical Procedures: DESCRIPTIVES, FREQUENCIES, CROSSTABS, MEANS, T-TEST, ONEWAY, CORRELATIONS, REGRESSION, RELIABILITY, FACTOR.

2. statcraft_list_commands (Dynamic Introspection)

Inspects all available statistical procedures, transformations, and utilities compiled into StatCraft.

  • Returns command IDs, menu hierarchy, syntax keywords, and complete JSON parameter schemas.
  • Supports optional "category" filter (e.g. "Statistics", "Transform", "Data").
  • Dynamic resource equivalent: read statcraft://commands for full Markdown catalog.

3. statcraft_execute_command (Universal Direct Command Execution)

Directly executes any StatCraft engine command by its command_id and JSON arguments.

  • Automatically validates parameters according to the command's JSON schema.
  • Records output into Output Viewer and returns structured JSON plus formatted output text.
  • Can invoke any current or future procedure without code changes in the bridge!

4. statcraft_load_dataset

Directly loads raw tabular text (CSV, TSV) into the active session memory without writing temporary files to disk.

  • Parameters: csv_content (string, required), name (string, optional).

5. statcraft_list_variables

Inspects the variable dictionary of the active dataset: names, types, measures, labels, value labels, and missing value rules.

6. statcraft_get_data_preview

Fetches the first $N$ rows (default 10) to inspect value distributions before running analysis.

  • Parameters: limit (integer, optional).

7. statcraft_insert_output_note

Inserts an analytical card or APA-style conclusion into the StatCraft Output Viewer tree.

  • Parameters: title (string, required), content (string, required).

8. statcraft_set_active_tab

Switches active view tab in StatCraft ("data", "variable", "output", "syntax").


3. Recommended Workflow

  1. Inspect Data: Call statcraft_list_variables or statcraft_get_data_preview.
  2. Consult Syntax if Needed: Run HELP <COMMAND>. via statcraft_run_syntax to verify available subcommands.
  3. Execute Analysis in Batch:
    VARIABLE LEVEL salary (SCALE) /jobcat (NOMINAL).
    ONEWAY salary BY jobcat /STATISTICS DESCRIPTIVES HOMOGENEITY.
  4. Interpret Output: Read the returned ASCII ANOVA and Descriptives tables directly from the tool response.
  5. Summarize Findings: Insert an analytical note into the report tree via statcraft_insert_output_note.

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.