Skip to content
Back to skills

1 Template Versioning

ASecurity

Sub-skill of office-docs: 1. Template Versioning (+3).

  • 17 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
documentationpythongo

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill 1-template-versioning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1 Template Versioning?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1 Template Versioning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-1-template-versioning/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-1-template-versioning)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: office-docs-1-template-versioning
description: 'Sub-skill of office-docs: 1. Template Versioning (+3).'
version: 1.0.0
category: data
type: reference
scripts_exempt: true
---

# 1. Template Versioning (+3)

## 1. Template Versioning

```
templates/
├── v1/
│   └── contract_template.docx
├── v2/
│   └── contract_template.docx  # Updated branding
└── current -> v2/              # Symlink to current version
```


## 2. Validation Before Generation

```python
def validate_context(context, required_fields):
    """Validate context before document generation."""
    missing = [f for f in required_fields if f not in context or not context[f]]
    if missing:
        raise ValueError(f"Missing required fields: {missing}")
    return True
```


## 3. Output Organization

```python
from datetime import datetime

def get_output_path(doc_type, client_id, extension='docx'):
    """Generate organized output path."""
    date_str = datetime.now().strftime('%Y/%m/%d')
    return f"output/{doc_type}/{date_str}/{client_id}.{extension}"
```


## 4. Logging and Audit Trail

```python
def generate_with_audit(template, context, output_path):
    """Generate document with audit logging."""
    start_time = time.time()

    result = generate_document(template, context, output_path)

    audit_log.info({
        'action': 'document_generated',
        'template': template,
        'output': output_path,
        'duration': time.time() - start_time,
        'context_keys': list(context.keys())
    })

    return result
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.