What Is the Directory Structure of the Patent-Disclosure-Skill Repository?

The patent-disclosure-skill repository organizes code into modular Skill packages under skills/, with each skill containing a tools/ subdirectory for utilities and a SKILL.md descriptor, alongside documentation assets, CI workflows, and configuration files at the root level.

The patent-disclosure-skill repository follows a modular architecture designed for the Instag​it platform. Understanding its directory structure reveals how distinct patent-related capabilities—from open-access data handling to disclosure document generation—are encapsulated in isolated, reusable components.

Top-Level Organization

At the root level, the repository separates concerns into five primary areas:

  • docs/ – Stores static image assets and screenshots referenced by documentation
  • skills/ – Houses the core implementation packages (the heart of the repository)
  • scripts/ – Contains development and maintenance utilities
  • .github/ – Defines CI/CD workflows
  • Configuration files – README.md, INSTALL.md, requirements.txt, LICENSE, and a root-level SKILL.md for Instag​it integration

The Skills/ Directory: Core Architecture

The skills/ directory implements five distinct patent-related capabilities. Each sub-directory follows a standardized layout: a tools/ package containing reusable Python modules, plus a SKILL.md that describes the skill to the platform.

Patent-OA Skill (Open-Access Data Handling)

Located at skills/patent-oa/, this skill manages open-access patent data ingestion and vector search. Its tools/ subdirectory contains:

  • config.py – Configuration loader for API keys and model settings
  • embed.py – Embedding logic for vector search using OpenAI embeddings
  • ingest_case.py – Case-ingestion pipeline for building vector stores

The skill descriptor resides at skills/patent-oa/SKILL.md.

Patent-Disclosure Skill (Document Generation)

The skills/patent-disclosure/ directory contains the rendering pipeline that converts structured patent data into visual disclosures. Key utilities in tools/ include:

Patent-Exam-Policy Skill (Policy References)

This skill stores policy-related prompts and reference materials under skills/patent-exam-policy/:

  • prompts/ – Templates for intake workflows and guardrails
  • references/ – Topic-prompt maps and source lists

Patent-Reader and Patent-Search Skills

Development and CI Infrastructure

Beyond the skills, the repository includes automation and maintenance tools:

Working with Repository Modules

The directory structure supports direct import of utility functions. Below are practical examples demonstrating how to interact with key modules.

Loading OA Configuration

Import the configuration loader from the OA tools package to access settings:

from skills.patent_oa.tools.config import load_config

cfg = load_config()                     # Reads skills/patent-oa/tools/config.yaml

print(cfg["openai_api_key"])           # Access specific API settings

Source: skills/patent-oa/tools/config.py

Use the embedding utility to prepare text for similarity search:

from skills.patent_oa.tools.embed import embed_text

text = "A method for producing a renewable polymer..."
vector = embed_text(text)               # Returns NumPy array ready for ANN search

print(vector.shape)                    # Output: (768,)

Source: skills/patent-oa/tools/embed.py

Converting Markdown to DOCX

Generate styled Word documents from Markdown disclosures:

from skills.patent_disclosure.tools.md_to_docx import md_to_docx

md_path   = "output/disclosure.md"
docx_path = "output/disclosure.docx"

md_to_docx(md_path, docx_path)         # Creates formatted Word document

Source: skills/patent-disclosure/tools/md_to_docx.py

Summary

  • The skills/ directory contains five distinct patent-related capabilities, each isolated in its own package
  • Each skill follows a standardized layout with tools/ for Python utilities and SKILL.md for Instag​it metadata
  • The patent-disclosure skill handles document rendering via md_to_docx.py and pptx_to_md.py
  • The patent-oa skill manages vector search through embed.py and configuration via config.py
  • Root-level files like requirements.txt, INSTALL.md, and the GitHub Actions workflows provide setup instructions and automation

Frequently Asked Questions

What is the purpose of the SKILL.md files?

The SKILL.md files serve as skill descriptors for the Instag​it platform. Each file defines metadata, capabilities, and configuration requirements for its respective skill, allowing the platform to discover and load modular functionality automatically.

How are utility functions organized within each skill?

Each skill contains a tools/ subdirectory that houses reusable Python modules. For example, skills/patent-oa/tools/ includes config.py for settings management and embed.py for vector operations, while skills/patent-disclosure/tools/ contains rendering utilities like md_to_docx.py.

Where are the document conversion utilities located?

Markdown and PowerPoint conversion tools reside specifically in skills/patent-disclosure/tools/. The md_to_docx.py module handles Markdown-to-Word conversion, while pptx_to_md.py transforms PowerPoint presentations into Markdown format for further processing.

What maintenance scripts are available in the repository?

The scripts/ directory contains generate-star-history.py, which builds star-history charts for repository analytics. This script executes automatically via the update-star-history.yml GitHub Actions workflow defined in .github/workflows/.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →