Patent Disclosure Skill Directory Structure: Complete Guide to the handsomestWei Repository
The handsomestWei/patent-disclosure-skill repository organizes patent automation capabilities into modular Skill packages under the skills/ directory, with separate subdirectories for open-access data handling, disclosure generation, exam policies, and search functionality, alongside documentation, scripts, and configuration files at the root level.
The handsomestWei/patent-disclosure-skill repository provides a modular framework for patent-related automation tasks, structured to support the Instagit platform's skill-based architecture. Understanding its directory structure is essential for contributors and developers who want to extend its capabilities or integrate specific patent processing workflows. The codebase follows a clear separation between core skill implementations, utility tools, and project documentation.
Top-Level Directory Layout
The repository root contains five primary directories and several configuration files that define the project’s scope and entry points:
├─ docs/ # Documentation assets and screenshots
├─ skills/ # Core Skill implementations (patent workflows)
├─ scripts/ # Development and maintenance utilities
├─ .github/ # CI/CD workflow definitions
├─ .gitignore # Git ignore patterns
├─ LICENSE # License file
├─ README.md # Project overview and setup guide
├─ INSTALL.md # Detailed installation instructions
├─ requirements.txt # Python dependencies
└─ SKILL.md # Top-level skill descriptor for Instagit
The docs/ directory stores static assets such as thanks.jpg and illustrative PNG files used by the README, while .github/workflows/ houses automation like update-star-history.yml for repository analytics.
The skills/ Directory: Core Package Architecture
The skills/ directory is the heart of the repository, containing five distinct patent-processing capabilities. Each sub-directory follows a consistent layout: a tools/ package containing reusable Python modules, plus a SKILL.md descriptor file that declares the skill’s interface to the Instagit platform.
patent-oa: Open-Access Patent Data Handling
Located at skills/patent-oa/, this skill manages open-access patent data ingestion and vector search preparation. Its tools/ sub-directory includes:
config.py– Loads YAML configuration settings including API keys and model parametersembed.py– Implements text embedding logic for vector search using OpenAI embeddingsingest_case.py– Handles the case-ingestion pipeline for patent documents
The skill is described in skills/patent-oa/SKILL.md, which defines its capabilities for the platform.
patent-disclosure: Disclosure Generation Workflow
The skills/patent-disclosure/ directory contains the rendering pipeline that transforms structured patent data into visual disclosures. Key utilities in its tools/ folder include:
md_to_docx.py– Converts Markdown disclosure documents into Microsoft Word formatpptx_to_md.py– Transforms PowerPoint presentations into Markdown for processingstructure_lineart_gate.py– Implements gating logic for line-art processing in design patents
This skill also maintains its own SKILL.md descriptor at skills/patent-disclosure/SKILL.md.
patent-exam-policy: Policy References and Prompts
The skills/patent-exam-policy/ skill organizes regulatory and examination guidelines with:
prompts/– Template files for intake forms and guardrail constraintsreferences/– Topic-to-prompt mapping files and source lists
patent-reader and patent-search: UI and Retrieval
patent-reader/– Contains a simple patent-reading UI implementation with its ownSKILL.mdpatent-search/– Implements search-oriented functionality withprompts/patent_search.mdandconfig.yamlfor query configuration
Supporting Infrastructure
Beyond the core skills, the repository includes several support directories:
docs/ – Stores image assets including 效果例‑外观专利线稿.png (design patent line-art examples) and other illustrative screenshots referenced by documentation.
scripts/ – Contains maintenance utilities such as generate-star-history.py, which builds star-history charts for repository analytics.
.github/ – Hosts GitHub Actions workflows, specifically workflows/update-star-history.yml for automated repository metric updates.
Practical Code Examples
The following snippets demonstrate how to import and use utilities from the repository’s skill packages. Note that while directory names use hyphens, Python imports replace these with underscores.
Loading Configuration from patent-oa
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 configuration values
Source: skills/patent-oa/tools/config.py
Generating Text Embeddings for Vector 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 for ANN search
print(vector.shape) # → (768,)
Source: skills/patent-oa/tools/embed.py
Converting Markdown Disclosures to DOCX
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) # Generates styled Word document
Source: skills/patent-disclosure/tools/md_to_docx.py
Summary
- The
skills/directory contains five specialized packages (patent-oa,patent-disclosure,patent-exam-policy,patent-reader,patent-search) that implement distinct patent-related capabilities. - Each skill follows a standardized structure with a
tools/sub-directory for Python utilities and aSKILL.mddescriptor file for platform integration. - The
patent-oaskill handles data ingestion and vector embedding for search, whilepatent-disclosuremanages document conversion and rendering pipelines. - Supporting directories include
docs/for static assets,scripts/for maintenance utilities, and.github/for CI/CD workflows. - Root-level files such as
requirements.txt,INSTALL.md, and the top-levelSKILL.mdprovide dependency management and high-level project metadata.
Frequently Asked Questions
What is the purpose of the SKILL.md files throughout the repository?
Each SKILL.md file serves as a metadata descriptor that declares the skill’s capabilities, inputs, and outputs to the Instagit platform. According to the repository structure, these files exist at both the root level (defining the overall package) and within each skill sub-directory (defining specific patent-processing modules), enabling the platform to discover and invoke the correct tools automatically.
How does the patent-oa skill handle vector search embeddings?
The patent-oa skill implements embedding functionality in skills/patent-oa/tools/embed.py, which provides the embed_text() function. This utility converts patent text into high-dimensional vectors (typically 768 dimensions) suitable for approximate nearest neighbor (ANN) search, enabling semantic retrieval of similar patent documents from the vector store.
Can I use the markdown-to-DOCX converter independently of the full pipeline?
Yes. The md_to_docx.py module in skills/patent-disclosure/tools/ is designed as a standalone utility. You can import the md_to_docx() function directly, pass it a Markdown file path and an output DOCX path, and generate formatted Word documents without running the complete disclosure generation workflow, making it reusable for other documentation tasks.
Where are the CI/CD and automation configurations stored?
Continuous integration configurations are located in .github/workflows/, specifically the update-star-history.yml file which automates repository analytics. Additionally, the scripts/ directory at the repository root contains development utilities like generate-star-history.py, which supports maintenance tasks but is not part of the core patent-processing skills.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →