# Dit

> Classify HTML pages, forms, and fields using machine learning. Use when the user needs to detect page types (login, error, captcha), identify form types (login, search, registration), or classify form fields (username, password, email) from HTML content or URLs.

- **Type:** Skill
- **Install:** `agentstack add skill-happyhackingspace-skills-dit`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [HappyHackingSpace](https://agentstack.voostack.com/s/happyhackingspace)
- **Installs:** 0
- **Category:** [Communication](https://agentstack.voostack.com/c/communication)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [HappyHackingSpace](https://github.com/HappyHackingSpace)
- **Source:** https://github.com/HappyHackingSpace/skills/tree/main/skills/dit

## Install

```sh
agentstack add skill-happyhackingspace-skills-dit
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# dit - HTML Page, Form & Field Classifier

dît (means "found" in Kurdish) classifies HTML pages, forms, and fields using machine learning (LogReg + CRF). Zero external ML dependencies.

It classifies pages (login, error, landing, blog, etc.), detects form types (login, search, registration, password recovery, contact, etc.), and classifies each field (username, password, email, search query, etc.).

## Installation

```bash
go get github.com/happyhackingspace/dit
```

Or install the CLI:

```bash
go install github.com/happyhackingspace/dit/cmd/dit@latest
```

## CLI Usage

```bash
# Classify page type and forms on a URL
dit run https://github.com/login

# Classify forms in a local file
dit run login.html

# With probabilities
dit run https://github.com/login --proba

# Download training data and model from Hugging Face
dit data download

# Train a model
dit train model.json --data-folder data

# Evaluate model accuracy
dit evaluate --data-folder data

# Upload training data and model to Hugging Face
dit data upload
```

## Library Usage (Go)

```go
import "github.com/happyhackingspace/dit"

// Load classifier
c, _ := dit.New()

// Classify page type
page, _ := c.ExtractPageType(htmlString)
fmt.Println(page.Type)  // "login"
fmt.Println(page.Forms) // form classifications included

// Classify forms in HTML
results, _ := c.ExtractForms(htmlString)
for _, r := range results {
    fmt.Println(r.Type)   // "login"
    fmt.Println(r.Fields) // {"username": "username or email", "password": "password"}
}

// With probabilities
pageProba, _ := c.ExtractPageTypeProba(htmlString, 0.05)
formProba, _ := c.ExtractFormsProba(htmlString, 0.05)
```

## Page Types

login, registration, search, checkout, contact, password_reset, landing, product, blog, settings, soft_404, error, captcha, parked, coming_soon, admin, directory_listing, default_page, waf_block, other.

## Form Types

login, search, registration, password/login recovery, contact/comment, join mailing list, order/add to cart, other.

## Field Types

**Authentication**: username, password, password confirmation, email, email confirmation, username or email
**Names**: first name, last name, middle name, full name, organization name, gender
**Address**: country, city, state, address, postal code
**Contact**: phone, fax, url
**Search**: search query, search category
**Content**: comment text, comment title, about me text
**Buttons**: submit button, cancel button, reset button
**Verification**: captcha, honeypot, TOS confirmation, remember me checkbox, receive emails confirmation
**Security**: security question, security answer

Full list of 79 field type codes available in `data/config.json`.

## References

- Repository: https://github.com/HappyHackingSpace/dit

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [HappyHackingSpace](https://github.com/HappyHackingSpace)
- **Source:** [HappyHackingSpace/skills](https://github.com/HappyHackingSpace/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-happyhackingspace-skills-dit
- Seller: https://agentstack.voostack.com/s/happyhackingspace
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
