Skip to main content

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

MicroSkills Reference

Detect License

code.detect_license

ProductionHeuristic (Class C)Deterministicbest-effortfastv1.0.0
No network

Overview

When you supply license text or declared metadata, we match it against a pinned SPDX phrase dataset and return identifiers with confidence, method, and evidence counts. This is best-effort identification — not legal advice, and no match does not prove absence of obligations. We do not fetch remote license lists or run probabilistic models — do not use this as a substitute for legal review or full composition scanning.

License calls should be evidence-based and repeatable. We fingerprint text against a pinned dataset so your policy gates see the same answer every time.

Reliability

Best-effort and deterministic for a pinned datasetVersion. Domain error (not retryable; shrink input): LICENSE_DOCUMENT_LIMIT_EXCEEDED (too many documents or combined text too large). Low confidence and not-detected cases return in-band warnings — absence of a match is not proof of no obligations.

Context footprint

Returns detected matches, warnings, and the datasetVersion applied. A successful call costs 1 execution credit.

When to use it

When you have license text or declared metadata and need a likely SPDX id.

As legal sign-off or as a full composition-analysis substitute.

Scope

Note
Identifies likely SPDX licenses from text and metadata you supply.

Non-goals

  • Does not give legal advice
  • Does not declare licenses compatible or safe
  • Does not fetch remote license lists
  • Does not use probabilistic AI scoring

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisparsing

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 output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

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.
  • Output may reveal sensitive derived information
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
documentsarrayYesFrom 1 through 100 closed license documents, each with a path label and the license text; 101 is LICENSE_DOCUMENT_LIMIT_EXCEEDED.
packageMetadataobjectNoClosed package metadata containing only an optional declaredLicense property; omit it for text-only detection.
optionsobjectNoClosed confidence and evidence options; omit it to apply every documented default.

Output schema

FieldTypeRequiredDescription
declaredLicenseobjectNoClosed declared-license validation receipt with the exact SPDX raw string and whether it parsed.
detectedarrayYesFrom 0 through 10,000 unique SPDX matches ordered by confidence.
warningsarrayYesFrom 0 through 102 bounded warning objects with a stable code and a safe message.
datasetVersionstringYesPinned license phrase-dataset version.

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.detect_license","input":{"documents":[{"path":"LICENSE","content":"..."}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("code.detect_license", {"documents":[{"content":"MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction.\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, express or implied.","path":"LICENSE"}]});

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.
LICENSE_DOCUMENT_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not give legal advice
  • Does not declare licenses compatible or safe
  • Does not fetch remote license lists
  • Does not use probabilistic AI scoring
  • Legal compliance conclusions
  • Full-repo software composition analysis

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "code.detect_license",
  "input": {
    "documents": [
      {
        "content": "MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction.\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, express or implied.",
        "path": "LICENSE"
      }
    ]
  }
}

Examples

MIT license text matches with full confidence

Inputjson
{
  "documents": [
    {
      "content": "MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction.\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, express or implied.",
      "path": "LICENSE"
    }
  ]
}
Expected outputjson
{
  "warnings": [],
  "detected": [
    {
      "method": "normalized_fingerprint",
      "spdxId": "MIT",
      "path": "LICENSE",
      "matchedPhraseCount": 3,
      "name": "MIT License",
      "missingPhraseCount": 0,
      "confidence": 1
    }
  ],
  "datasetVersion": "spdx-phrase-2026-07"
}

Unrecognized prose yields a not-detected warning

Inputjson
{
  "documents": [
    {
      "content": "This is just some random text.",
      "path": "README"
    }
  ]
}
Expected outputjson
{
  "warnings": [
    {
      "code": "LICENSE_NOT_DETECTED",
      "message": "No license matched with sufficient confidence; absence is not proof of no obligations",
      "severity": "warning"
    }
  ],
  "detected": [],
  "datasetVersion": "spdx-phrase-2026-07"
}
  • Tag a LICENSE file with an SPDX id before policy checks
  • Flag metadata conflicts between declared and detected licenses
  • Pre-screen text before human legal review

Avoid for

  • Legal compliance conclusions
  • Full-repo software composition analysis

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

codeanalysislicense