Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Validate Gitignore

code.validate_gitignore

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

When you send .gitignore content and an explicit file list, we parse patterns and report whether each path would be ignored, which rule matched, and optional decision traces. We never walk a filesystem or invoke Git — do not use this for real working-tree or global-exclude behavior.

gitignore precedence and negation are subtle. We evaluate your rules deterministically so you know what would be ignored.

Reliability

STRICT and deterministic; last matching pattern wins. Domain errors (not retryable; fix input): GITIGNORE_COMPLEXITY_LIMIT_EXCEEDED (too many files, patterns, or evaluations — reduce inputs); GITIGNORE_PATH_INVALID (absolute or traversal path — send relative safe paths). Syntax errors appear in warnings and set valid=false.

Context footprint

Returns parsed patterns, per-path results, warnings, and _meta. A successful call costs 1 execution credit.

When to use it

When you have .gitignore text and a bounded path list to check.

When you need real working-tree or global-exclude behavior.

Scope

Note
Validates .gitignore syntax and evaluates explicit paths offline.

Non-goals

  • Does not walk a filesystem
  • Does not invoke Git
  • Does not support .gitattributes
  • Does not apply global excludes implicitly

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
gitignorestringYesExact gitignore rules text.
filesarrayYesFrom 0 through 100,000 explicit relative paths to evaluate, each a path string or a closed {path, optional isDirectory} object.
basePathstringNoRelative matching prefix; omit it for the empty root.
includeDecisionTracebooleanNoWhether decision fields are returned; omit it for true.
optionsobjectNoClosed matching options; omit it to apply sensitive matching with decision traces.

Output schema

FieldTypeRequiredDescription
validbooleanYesWhether no syntax errors occurred.
patternsarrayYesFrom 0 through 10,000 usable rules in source order, each a closed line, pattern, negation, directoryOnly and anchored.
resultsarrayYesFrom 0 through 100,000 path verdicts in caller order, each a closed path, ignored flag and matching rule.
warningsarrayYesFrom 0 through 10,000 bounded parser warnings, each a closed code, message, line and severity.
_metaobjectYesClosed bounded evaluation-count receipt with patternCount and fileCount for this run.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"code.validate_gitignore","input":{"gitignore":"*.log\n","files":["a.log","a.txt"]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("code.validate_gitignore", {"files":["target/a.class","important.txt"],"gitignore":"target/\n!important.txt\n"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
GITIGNORE_COMPLEXITY_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
GITIGNORE_PATH_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not walk a filesystem
  • Does not invoke Git
  • Does not support .gitattributes
  • Does not apply global excludes implicitly
  • Evaluating a real working tree
  • Global or core.excludesFile behavior

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "code.validate_gitignore",
  "input": {
    "files": [
      "target/a.class",
      "important.txt"
    ],
    "gitignore": "target/\n!important.txt\n"
  }
}

Examples

Negation un-ignores an earlier pattern

Inputjson
{
  "files": [
    "target/a.class",
    "important.txt"
  ],
  "gitignore": "target/\n!important.txt\n"
}
Expected outputjson
{
  "warnings": [],
  "valid": true,
  "_meta": {
    "patternCount": 2,
    "fileCount": 2
  },
  "results": [
    {
      "negation": false,
      "path": "target/a.class",
      "matchedLine": 1,
      "ignored": true,
      "matchedPattern": "target/"
    },
    {
      "negation": true,
      "path": "important.txt",
      "matchedLine": 2,
      "ignored": false,
      "matchedPattern": "!important.txt"
    }
  ],
  "patterns": [
    {
      "anchored": false,
      "negation": false,
      "pattern": "target/",
      "directoryOnly": true,
      "line": 1
    },
    {
      "anchored": false,
      "negation": true,
      "pattern": "!important.txt",
      "directoryOnly": false,
      "line": 2
    }
  ]
}

Simple glob ignores log files only

Inputjson
{
  "files": [
    "a.log",
    "a.txt"
  ],
  "gitignore": "*.log\n"
}
Expected outputjson
{
  "warnings": [],
  "valid": true,
  "_meta": {
    "patternCount": 1,
    "fileCount": 2
  },
  "results": [
    {
      "negation": false,
      "path": "a.log",
      "matchedLine": 1,
      "ignored": true,
      "matchedPattern": "*.log"
    },
    {
      "path": "a.txt",
      "ignored": false,
      "matchedLine": null,
      "matchedPattern": null,
      "negation": false
    }
  ],
  "patterns": [
    {
      "anchored": false,
      "negation": false,
      "pattern": "*.log",
      "directoryOnly": false,
      "line": 1
    }
  ]
}
  • Preview whether files would be ignored before commit
  • Lint .gitignore syntax
  • Explain which pattern matched a path

Avoid for

  • Evaluating a real working tree
  • Global or core.excludesFile behavior

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

codegitignorevalidation