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

> Understand the patent-disclosure-skill repository structure. Explore organized Skill packages, tool subdirectories, SKILL.md descriptors, and root-level assets for efficient navigation and development.

- Repository: [handsomestWei/patent-disclosure-skill](https://github.com/handsomestWei/patent-disclosure-skill)
- Tags: documentation
- Published: 2026-09-04

---

**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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/README.md), [`INSTALL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/INSTALL.md), [`requirements.txt`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/requirements.txt), `LICENSE`, and a root-level [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/config.py)** – Configuration loader for API keys and model settings
- **[`embed.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/embed.py)** – Embedding logic for vector search using OpenAI embeddings
- **[`ingest_case.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/ingest_case.py)** – Case-ingestion pipeline for building vector stores

The skill descriptor resides at [`skills/patent-oa/SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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:

- **[`md_to_docx.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/md_to_docx.py)** – Converts Markdown disclosures into Microsoft Word documents
- **[`pptx_to_md.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/pptx_to_md.py)** – Transforms PowerPoint files to Markdown format
- **[`structure_lineart_gate.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/structure_lineart_gate.py)** – Line-art gating logic for appearance patents

### 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

- **`patent-reader/`** – Implements a simple patent-reading UI with its own [`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md)
- **`patent-search/`** – Contains search-oriented prompts in [`prompts/patent_search.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/prompts/patent_search.md) and a [`config.yaml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/config.yaml) for search parameters

## Development and CI Infrastructure

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

- **[`scripts/generate-star-history.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/scripts/generate-star-history.py)** – Generates star-history metadata for repository analytics
- **[`.github/workflows/update-star-history.yml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/.github/workflows/update-star-history.yml)** – GitHub Actions workflow that executes the star-history script automatically

## 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:

```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 API settings

```

*Source:* [`skills/patent-oa/tools/config.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-oa/tools/config.py)

### Embedding Text for Vector Search

Use the embedding utility to prepare text for similarity 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 ready for ANN search

print(vector.shape)                    # Output: (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 to DOCX

Generate styled Word documents from Markdown disclosures:

```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)         # Creates formatted 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 distinct patent-related capabilities, each isolated in its own package
- Each skill follows a standardized layout with **`tools/`** for Python utilities and **[`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/SKILL.md)** for Instag​it metadata
- The **`patent-disclosure`** skill handles document rendering via [`md_to_docx.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/md_to_docx.py) and [`pptx_to_md.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/pptx_to_md.py)
- The **`patent-oa`** skill manages vector search through [`embed.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/embed.py) and configuration via [`config.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/config.py)
- Root-level files like [`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 GitHub Actions workflows provide setup instructions and automation

## Frequently Asked Questions

### What is the purpose of the SKILL.md files?

The **[`SKILL.md`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/config.py) for settings management and [`embed.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/embed.py) for vector operations, while `skills/patent-disclosure/tools/` contains rendering utilities like [`md_to_docx.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/md_to_docx.py) module handles Markdown-to-Word conversion, while [`pptx_to_md.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/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`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/generate-star-history.py), which builds star-history charts for repository analytics. This script executes automatically via the **[`update-star-history.yml`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/update-star-history.yml)** GitHub Actions workflow defined in `.github/workflows/`.