# Patent Disclosure Skill Directory Structure: Complete Guide to the handsomestWei Repository

> Explore the handsomestWei patent-disclosure-skill repository's directory structure. Understand how skills, data handling, and generation are organized for patent automation.

- Repository: [handsomestWei/patent-disclosure-skill](https://github.com/handsomestWei/patent-disclosure-skill)
- Tags: how-to-guide
- Published: 2026-09-06

---

**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 Instag​it 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:

```text
├─ 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 Instag​it

```

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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md) descriptor file that declares the skill’s interface to the Instag​it 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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/config.py)** – Loads YAML configuration settings including API keys and model parameters
- **[`embed.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/embed.py)** – Implements text embedding logic for vector search using OpenAI embeddings
- **[`ingest_case.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/ingest_case.py)** – Handles the case-ingestion pipeline for patent documents

The skill is described in [`skills/patent-oa/SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/md_to_docx.py)** – Converts Markdown disclosure documents into Microsoft Word format
- **[`pptx_to_md.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/pptx_to_md.py)** – Transforms PowerPoint presentations into Markdown for processing
- **[`structure_lineart_gate.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/structure_lineart_gate.py)** – Implements gating logic for line-art processing in design patents

This skill also maintains its own [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md) descriptor at [`skills/patent-disclosure/SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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 constraints
- **`references/`** – 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 own [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md)
- **`patent-search/`** – Implements search-oriented functionality with [`prompts/patent_search.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/prompts/patent_search.md) and [`config.yaml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/config.yaml) for 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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/generate-star-history.py), which builds star-history charts for repository analytics.

**`.github/`** – Hosts GitHub Actions workflows, specifically [`workflows/update-star-history.yml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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

```python
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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-oa/tools/config.py)

### Generating Text Embeddings for Vector Search

```python
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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-oa/tools/embed.py)

### Converting Markdown Disclosures to DOCX

```python
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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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 a **[`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md)** descriptor file for platform integration.
- The **`patent-oa`** skill handles data ingestion and vector embedding for search, while **`patent-disclosure`** manages 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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt), [`INSTALL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/INSTALL.md), and the top-level [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md) provide 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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md) file serves as a metadata descriptor that declares the skill’s capabilities, inputs, and outputs to the Instag​it 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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/generate-star-history.py), which supports maintenance tasks but is not part of the core patent-processing skills.