packet-tracer-skill 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/LICENSES/LICENSE.Twofish-BSD-3-Clause.txt +29 -0
- package/README.md +687 -0
- package/SKILL.md +221 -0
- package/bin/packet-tracer-skill.js +635 -0
- package/examples/blueprint_minimal.json +46 -0
- package/package.json +42 -0
- package/references/packettracer-sample-catalog.json +21410 -0
- package/references/packettracer-sample-catalog.md +1124 -0
- package/references/pkt-format.md +57 -0
- package/references/xml-skeleton-notes.md +44 -0
- package/requirements-dev.txt +1 -0
- package/requirements.txt +6 -0
- package/scripts/build_sample_catalog.py +65 -0
- package/scripts/donor_diagnostics.py +35 -0
- package/scripts/generate_pkt.py +1264 -0
- package/scripts/install_skill.py +71 -0
- package/scripts/intent_parser.py +712 -0
- package/scripts/packet_tracer_env.py +278 -0
- package/scripts/pkt_builder.py +15 -0
- package/scripts/pkt_codec.py +181 -0
- package/scripts/pkt_editor.py +752 -0
- package/scripts/pkt_transformer.py +541 -0
- package/scripts/sample_catalog.py +385 -0
- package/scripts/sample_selector.py +156 -0
- package/scripts/setup.ps1 +26 -0
- package/scripts/twofish_diagnostics.py +91 -0
- package/scripts/vendor/README.md +46 -0
- package/scripts/vendor/twofish.py +81 -0
- package/scripts/workspace_repair.py +441 -0
- package/templates/pt900/base_empty.xml +21 -0
- package/templates/pt900/device_library/pc.xml +20 -0
- package/templates/pt900/device_library/printer.xml +432 -0
- package/templates/pt900/device_library/router.xml +16 -0
- package/templates/pt900/device_library/switch.xml +38 -0
package/README.md
ADDED
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
# packet-tracer-skill
|
|
2
|
+
|
|
3
|
+
Cisco Packet Tracer 9.x `.pkt` generator and editor for skill-based coding hosts.
|
|
4
|
+
|
|
5
|
+
Bu repository skill əsaslı coding host-lar üçün Cisco Packet Tracer 9.x `.pkt`
|
|
6
|
+
generatoru və editorudur.
|
|
7
|
+
|
|
8
|
+
<table>
|
|
9
|
+
<tr>
|
|
10
|
+
<td>
|
|
11
|
+
<strong>Choose your language / Dilinizi seçin</strong><br />
|
|
12
|
+
<a href="#english">🇬🇧 English</a>
|
|
13
|
+
|
|
|
14
|
+
<a href="#azerbaycan-dili">🇦🇿 Azərbaycan dili</a>
|
|
15
|
+
</td>
|
|
16
|
+
</tr>
|
|
17
|
+
</table>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<a id="english"></a>
|
|
22
|
+
## English
|
|
23
|
+
|
|
24
|
+
### Overview
|
|
25
|
+
|
|
26
|
+
This repository is built for one specific job: take a natural-language network
|
|
27
|
+
request, plan it explicitly, adapt a compatible local Cisco Packet Tracer donor
|
|
28
|
+
lab, and produce a `.pkt` file that opens cleanly in Packet Tracer 9.x.
|
|
29
|
+
|
|
30
|
+
Design defaults:
|
|
31
|
+
|
|
32
|
+
- Cisco local samples are the primary donor source
|
|
33
|
+
- external labs are reference-only
|
|
34
|
+
- prompt parsing happens before generation
|
|
35
|
+
- generation uses donor-prune adaptation for compatibility
|
|
36
|
+
- unsafe requests return `blocking_gaps` instead of guessed output
|
|
37
|
+
|
|
38
|
+
### Host Support
|
|
39
|
+
|
|
40
|
+
Use the same repository, then install it into the skill path your host expects.
|
|
41
|
+
|
|
42
|
+
| Tool | Install | First Use |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| Claude Code | `npx packet-tracer-skill --claude` | `Use /pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
45
|
+
| Claude Desktop | `npx packet-tracer-skill --path <claude-desktop-skills-dir>` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
46
|
+
| Cursor | `npx packet-tracer-skill --cursor` | `@pkt build a Packet Tracer lab with VLAN and DHCP` |
|
|
47
|
+
| Gemini CLI | `npx packet-tracer-skill --path <gemini-skills-dir>` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
48
|
+
| Codex CLI | `npx packet-tracer-skill` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
49
|
+
| Antigravity | `npx packet-tracer-skill --path <antigravity-skills-dir>` | `Use @pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
50
|
+
| Kiro CLI | `npx packet-tracer-skill --kiro` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
51
|
+
| Kiro IDE | `npx packet-tracer-skill --kiro` | `Use @pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
52
|
+
| GitHub Copilot | Copy this repo into your local prompts/rules/skills docs | `Ask Copilot to use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
53
|
+
| OpenCode | `npx packet-tracer-skill --path .agents/skills` | `opencode run @pkt build a Packet Tracer lab with VLAN and DHCP` |
|
|
54
|
+
| AdaL CLI | `npx packet-tracer-skill --adal` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
55
|
+
| Custom path | `npx packet-tracer-skill --path ./my-skills` | Depends on your tool |
|
|
56
|
+
|
|
57
|
+
### Quick Start
|
|
58
|
+
|
|
59
|
+
Default install for Codex:
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
npx packet-tracer-skill
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
That already installs everything shipped inside this repository.
|
|
66
|
+
|
|
67
|
+
If you want one command that installs everything this repository can install by
|
|
68
|
+
itself, use bootstrap:
|
|
69
|
+
|
|
70
|
+
```powershell
|
|
71
|
+
npx packet-tracer-skill --bootstrap
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
That command:
|
|
75
|
+
|
|
76
|
+
- installs the skill into the selected host path
|
|
77
|
+
- creates a local `.venv` inside the installed skill directory
|
|
78
|
+
- installs declared Python requirements from this repository
|
|
79
|
+
|
|
80
|
+
It still does not install Cisco Packet Tracer itself.
|
|
81
|
+
|
|
82
|
+
Common targets:
|
|
83
|
+
|
|
84
|
+
```powershell
|
|
85
|
+
npx packet-tracer-skill --path <claude-desktop-skills-dir>
|
|
86
|
+
npx packet-tracer-skill --cursor
|
|
87
|
+
npx packet-tracer-skill --claude
|
|
88
|
+
npx packet-tracer-skill --kiro
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If PowerShell blocks `npx.ps1`, use:
|
|
92
|
+
|
|
93
|
+
```powershell
|
|
94
|
+
cmd /c npx packet-tracer-skill --cursor
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
If you want the local development setup instead:
|
|
98
|
+
|
|
99
|
+
```powershell
|
|
100
|
+
git clone https://github.com/20hajiyev/packet-tracer-skill.git
|
|
101
|
+
cd .\packet-tracer-skill
|
|
102
|
+
powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1 -Dev
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Verify the Install
|
|
106
|
+
|
|
107
|
+
Check that the skill was installed into the expected target path:
|
|
108
|
+
|
|
109
|
+
```powershell
|
|
110
|
+
npx packet-tracer-skill --verify
|
|
111
|
+
npx packet-tracer-skill --verify --cursor
|
|
112
|
+
npx packet-tracer-skill --verify --path .agents/skills
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
From a local clone:
|
|
116
|
+
|
|
117
|
+
```powershell
|
|
118
|
+
node .\bin\packet-tracer-skill.js --verify
|
|
119
|
+
python .\scripts\install_skill.py --host codex --force
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Check Runtime Requirements
|
|
123
|
+
|
|
124
|
+
Repository install and runtime readiness are different things.
|
|
125
|
+
|
|
126
|
+
- `install` copies the skill files
|
|
127
|
+
- `doctor` checks system prerequisites for real `.pkt` generation
|
|
128
|
+
|
|
129
|
+
Run:
|
|
130
|
+
|
|
131
|
+
```powershell
|
|
132
|
+
npx packet-tracer-skill --doctor
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
It checks:
|
|
136
|
+
|
|
137
|
+
- `node`
|
|
138
|
+
- `python`
|
|
139
|
+
- `python_version`
|
|
140
|
+
- `python_support_status`
|
|
141
|
+
- `PACKET_TRACER_ROOT`
|
|
142
|
+
- `PACKET_TRACER_TARGET_VERSION`
|
|
143
|
+
- `PACKET_TRACER_COMPAT_DONOR`
|
|
144
|
+
- donor version compatibility with the target Packet Tracer version
|
|
145
|
+
- `resolved_twofish_path`
|
|
146
|
+
- `twofish_load_status`
|
|
147
|
+
- `twofish_sha256`
|
|
148
|
+
|
|
149
|
+
### Runtime Configuration
|
|
150
|
+
|
|
151
|
+
Set the local Packet Tracer environment before real `.pkt` generation:
|
|
152
|
+
|
|
153
|
+
```powershell
|
|
154
|
+
$env:PACKET_TRACER_ROOT='C:\Program Files\Cisco Packet Tracer 9.0.0'
|
|
155
|
+
$env:PACKET_TRACER_COMPAT_DONOR='C:\path\to\your-working-9.0-donor.pkt'
|
|
156
|
+
$env:PKT_TWOFISH_LIBRARY="$env:USERPROFILE\.codex\skills\pkt\scripts\vendor\_twofish.cp314-win_amd64.pyd"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Important variables:
|
|
160
|
+
|
|
161
|
+
- `PACKET_TRACER_ROOT`
|
|
162
|
+
- `PACKET_TRACER_SAVES_ROOT`
|
|
163
|
+
- `PACKET_TRACER_EXE`
|
|
164
|
+
- `PACKET_TRACER_COMPAT_DONOR`
|
|
165
|
+
- `PACKET_TRACER_TARGET_VERSION`
|
|
166
|
+
- `PKT_TWOFISH_LIBRARY`
|
|
167
|
+
|
|
168
|
+
Donor policy:
|
|
169
|
+
|
|
170
|
+
- `PACKET_TRACER_COMPAT_DONOR` is an explicit override
|
|
171
|
+
- if it is not set, the repo tries to auto-detect a local Packet Tracer 9.0 donor from common local locations
|
|
172
|
+
- if it is set and wrong, the repo does not silently fall back to another donor
|
|
173
|
+
|
|
174
|
+
Required policy:
|
|
175
|
+
|
|
176
|
+
- keep `PACKET_TRACER_TARGET_VERSION` on `9.0.0.0810`
|
|
177
|
+
- do not switch the target version to `5.3.0.0011`
|
|
178
|
+
- do not use a legacy `5.3` donor or template fallback to bypass strict 9.0 generation
|
|
179
|
+
- if the donor is missing or version-mismatched, stop and fix the donor instead of downgrading the workflow
|
|
180
|
+
|
|
181
|
+
Host note:
|
|
182
|
+
|
|
183
|
+
- the host process must inherit the same `PACKET_TRACER_*` and `PKT_TWOFISH_LIBRARY` environment variables
|
|
184
|
+
- this applies to every host equally: Codex, Cursor, Claude Code, Claude Desktop, Antigravity, Gemini CLI, Kiro, and similar tools
|
|
185
|
+
- if a host wrapper blocks child-process inspection, run `python .\scripts\donor_diagnostics.py` from a local clone to verify the donor directly
|
|
186
|
+
|
|
187
|
+
Where to place the Twofish binary:
|
|
188
|
+
|
|
189
|
+
- preferred: put `_twofish.cp314-win_amd64.pyd` next to `scripts/vendor/twofish.py` inside the installed skill folder
|
|
190
|
+
- override: set `PKT_TWOFISH_LIBRARY` to the exact local binary path
|
|
191
|
+
- do not point `PKT_TWOFISH_LIBRARY` at a placeholder path such as `C:\tools\pkt-twofish\...` unless that file actually exists
|
|
192
|
+
|
|
193
|
+
### What This Repo Does
|
|
194
|
+
|
|
195
|
+
- Parses hybrid Azerbaijani + English prompts
|
|
196
|
+
- Builds explicit `IntentPlan`, `TopologyPlan`, and `ConfigPlan`
|
|
197
|
+
- Ranks Cisco local donors by capability and topology fit
|
|
198
|
+
- Uses donor-prune adaptation for Packet Tracer 9.x compatibility
|
|
199
|
+
- Edits existing `.pkt` labs
|
|
200
|
+
- Supports VLAN, router-on-a-stick, DHCP, DNS, Telnet, ACL, wireless/AP-client, and department/campus layouts
|
|
201
|
+
- Explains the plan before generation with `--explain-plan`
|
|
202
|
+
|
|
203
|
+
### Explain-Plan Output
|
|
204
|
+
|
|
205
|
+
`--explain-plan` reports:
|
|
206
|
+
|
|
207
|
+
- `intent_plan`
|
|
208
|
+
- `topology_plan`
|
|
209
|
+
- `config_plan`
|
|
210
|
+
- `estimate_plan`
|
|
211
|
+
- `preflight_validation`
|
|
212
|
+
- `autofix_summary`
|
|
213
|
+
- `validation_report`
|
|
214
|
+
- `cisco_sample_candidates`
|
|
215
|
+
- `external_reference_patterns`
|
|
216
|
+
- `assumptions_used`
|
|
217
|
+
|
|
218
|
+
This is the main debugging surface for prompt quality.
|
|
219
|
+
|
|
220
|
+
### External Reference Workflow
|
|
221
|
+
|
|
222
|
+
External `.pkt` collections must be local first. This tool does not scrape the
|
|
223
|
+
internet and does not use GitHub URLs directly as donors.
|
|
224
|
+
|
|
225
|
+
Workflow:
|
|
226
|
+
|
|
227
|
+
1. clone or copy the external repo locally
|
|
228
|
+
2. pass that folder with `--reference-root`
|
|
229
|
+
3. inspect `external_reference_patterns` in `--explain-plan`
|
|
230
|
+
|
|
231
|
+
Example:
|
|
232
|
+
|
|
233
|
+
```powershell
|
|
234
|
+
python .\scripts\generate_pkt.py --explain-plan "6 şöbəli şəbəkə qur, hər şöbədə 1 switch 1 AP 1 printer 2 PC 2 tablet olsun" --reference-root C:\labs\external-pkt-samples
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Common Commands
|
|
238
|
+
|
|
239
|
+
Build the Cisco sample catalog:
|
|
240
|
+
|
|
241
|
+
```powershell
|
|
242
|
+
python .\scripts\build_sample_catalog.py
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Explain a simple prompt:
|
|
246
|
+
|
|
247
|
+
```powershell
|
|
248
|
+
python .\scripts\generate_pkt.py --explain-plan "3 dene switch ve 6 komputer"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Explain a donor-prune campus prompt:
|
|
252
|
+
|
|
253
|
+
```powershell
|
|
254
|
+
python .\scripts\generate_pkt.py --explain-plan "6 şöbəli şəbəkə qur, hər şöbədə 1 switch, 1 AP, 1 printer, 2 PC, 2 tablet olsun, router-on-a-stick olsun, DHCP routerdən verilsin, management VLAN və telnet olsun"
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Generate a `.pkt`:
|
|
258
|
+
|
|
259
|
+
```powershell
|
|
260
|
+
python .\scripts\generate_pkt.py --prompt "6 şöbəli şəbəkə qur, hər şöbədə 1 switch, 1 AP, 1 printer, 2 PC, 2 tablet olsun, router-on-a-stick olsun, DHCP routerdən verilsin, management VLAN və telnet olsun" --output .\output\campus.pkt --xml-out .\output\campus.xml
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Inspect an existing `.pkt`:
|
|
264
|
+
|
|
265
|
+
```powershell
|
|
266
|
+
python .\scripts\generate_pkt.py --inventory .\input\lab.pkt
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Decode a `.pkt`:
|
|
270
|
+
|
|
271
|
+
```powershell
|
|
272
|
+
python .\scripts\generate_pkt.py --decode .\output\campus.pkt --xml-out .\output\campus.xml
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Requirements
|
|
276
|
+
|
|
277
|
+
- Windows
|
|
278
|
+
- Cisco Packet Tracer 9.x installed locally
|
|
279
|
+
- local Cisco Packet Tracer sample saves
|
|
280
|
+
- a local Packet Tracer 9.x donor lab
|
|
281
|
+
- a local Twofish bridge compatible with your Python runtime
|
|
282
|
+
|
|
283
|
+
Python setup:
|
|
284
|
+
|
|
285
|
+
```powershell
|
|
286
|
+
powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1 -Dev
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Twofish Bridge
|
|
290
|
+
|
|
291
|
+
This public repo does not ship a prebuilt Twofish bridge binary by default.
|
|
292
|
+
|
|
293
|
+
That is intentional:
|
|
294
|
+
|
|
295
|
+
- no machine-specific binary is committed by default
|
|
296
|
+
- no unsigned local artifact is published by accident
|
|
297
|
+
- no private path or build residue is shared by default
|
|
298
|
+
|
|
299
|
+
Runtime policy:
|
|
300
|
+
|
|
301
|
+
- supported Python runtime: `3.14.x` only
|
|
302
|
+
- the current bridge filename is ABI-specific: `_twofish.cp314-win_amd64.pyd`
|
|
303
|
+
- if you use Python `3.12`, `3.13`, `3.15`, or another ABI-incompatible build, `doctor` should report the runtime as unsupported
|
|
304
|
+
|
|
305
|
+
Read `scripts/vendor/README.md` for local setup.
|
|
306
|
+
|
|
307
|
+
### Common Failures
|
|
308
|
+
|
|
309
|
+
- `PACKET_TRACER_COMPAT_DONOR set but missing`
|
|
310
|
+
- the configured donor path does not exist
|
|
311
|
+
- fix the path or unset it and let the repo auto-detect a donor
|
|
312
|
+
- `PACKET_TRACER_COMPAT_DONOR_VERSION version_mismatch`
|
|
313
|
+
- the donor exists, but it is not a `9.0.0.0810` file
|
|
314
|
+
- do not downgrade to `5.3.0.0011`
|
|
315
|
+
- `TWOFISH_LOAD_STATUS missing`
|
|
316
|
+
- no local bridge was found
|
|
317
|
+
- put `_twofish.cp314-win_amd64.pyd` next to `scripts/vendor/twofish.py` or set `PKT_TWOFISH_LIBRARY`
|
|
318
|
+
- `PYTHON_SUPPORT_STATUS unsupported`
|
|
319
|
+
- your runtime is not Python `3.14.x`
|
|
320
|
+
- install Python 3.14 and rerun `--doctor`
|
|
321
|
+
|
|
322
|
+
### Screenshot
|
|
323
|
+
|
|
324
|
+
Generated campus topology opened in Cisco Packet Tracer:
|
|
325
|
+
|
|
326
|
+

|
|
327
|
+
|
|
328
|
+
### Security and Privacy
|
|
329
|
+
|
|
330
|
+
This repo is prepared to avoid accidental sharing of local private material:
|
|
331
|
+
|
|
332
|
+
- no hardcoded donor path is committed
|
|
333
|
+
- no `C:\Users\<name>\...` donor path is baked into config
|
|
334
|
+
- generated `.pkt` and `.xml` files are gitignored
|
|
335
|
+
- Python cache files are gitignored
|
|
336
|
+
- Twofish bridge binaries are gitignored
|
|
337
|
+
|
|
338
|
+
Before publishing:
|
|
339
|
+
|
|
340
|
+
- verify your own `PACKET_TRACER_COMPAT_DONOR` path is local-only
|
|
341
|
+
- do not commit generated labs unless you intend to share them
|
|
342
|
+
- do not commit locally built bridge binaries unless you reviewed them
|
|
343
|
+
|
|
344
|
+
### Current Limitations
|
|
345
|
+
|
|
346
|
+
- Packet Tracer 9.x only
|
|
347
|
+
- Windows-first workflow
|
|
348
|
+
- donor-prune generation is bounded by donor capacity
|
|
349
|
+
- external labs are not donors by default
|
|
350
|
+
- bundled template coverage is intentionally limited
|
|
351
|
+
|
|
352
|
+
### License
|
|
353
|
+
|
|
354
|
+
This project is licensed under the MIT License.
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
<a id="azerbaycan-dili"></a>
|
|
359
|
+
## Azərbaycan dili
|
|
360
|
+
|
|
361
|
+
### Ümumi baxış
|
|
362
|
+
|
|
363
|
+
Bu repository bir konkret iş üçün qurulub: təbii dildə yazılmış şəbəkə
|
|
364
|
+
istəyini başa düşmək, onu açıq plan şəklinə salmaq, lokal Cisco Packet Tracer
|
|
365
|
+
donor labını uyğunlaşdırmaq və Packet Tracer 9.x-də açılan `.pkt` faylı
|
|
366
|
+
yaratmaq.
|
|
367
|
+
|
|
368
|
+
Əsas prinsiplər:
|
|
369
|
+
|
|
370
|
+
- Cisco-nun lokal sample-ları əsas donor mənbəyidir
|
|
371
|
+
- xarici lab-lar yalnız reference kimi istifadə olunur
|
|
372
|
+
- prompt əvvəl parse olunur, sonra generate edilir
|
|
373
|
+
- uyğunluq üçün donor-prune yanaşması istifadə olunur
|
|
374
|
+
- natamam istəklər üçün uydurma nəticə yox, `blocking_gaps` qaytarılır
|
|
375
|
+
|
|
376
|
+
### Host dəstəyi
|
|
377
|
+
|
|
378
|
+
Eyni repository istifadə olunur, sadəcə host-un gözlədiyi skill yoluna
|
|
379
|
+
quraşdırılır.
|
|
380
|
+
|
|
381
|
+
| Alət | Quraşdırma | İlk istifadə |
|
|
382
|
+
| --- | --- | --- |
|
|
383
|
+
| Claude Code | `npx packet-tracer-skill --claude` | `Use /pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
384
|
+
| Claude Desktop | `npx packet-tracer-skill --path <claude-desktop-skills-dir>` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
385
|
+
| Cursor | `npx packet-tracer-skill --cursor` | `@pkt build a Packet Tracer lab with VLAN and DHCP` |
|
|
386
|
+
| Gemini CLI | `npx packet-tracer-skill --path <gemini-skills-dir>` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
387
|
+
| Codex CLI | `npx packet-tracer-skill` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
388
|
+
| Antigravity | `npx packet-tracer-skill --path <antigravity-skills-dir>` | `Use @pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
389
|
+
| Kiro CLI | `npx packet-tracer-skill --kiro` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
390
|
+
| Kiro IDE | `npx packet-tracer-skill --kiro` | `Use @pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
391
|
+
| GitHub Copilot | Bu repo-nu lokal prompts/rules/skills docs qovluğuna köçür | `Ask Copilot to use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
392
|
+
| OpenCode | `npx packet-tracer-skill --path .agents/skills` | `opencode run @pkt build a Packet Tracer lab with VLAN and DHCP` |
|
|
393
|
+
| AdaL CLI | `npx packet-tracer-skill --adal` | `Use pkt to build a Packet Tracer lab with VLAN and DHCP` |
|
|
394
|
+
| Custom path | `npx packet-tracer-skill --path ./my-skills` | Host-a görə dəyişir |
|
|
395
|
+
|
|
396
|
+
### Sürətli başlanğıc
|
|
397
|
+
|
|
398
|
+
Codex üçün standart quraşdırma:
|
|
399
|
+
|
|
400
|
+
```powershell
|
|
401
|
+
npx packet-tracer-skill
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
Bu komanda repository daxilində olan bütün faylları quraşdırır.
|
|
405
|
+
|
|
406
|
+
Əgər repository-nin quraşdıra bildiyi hər şeyi bir komandada qurmaq
|
|
407
|
+
istəyirsənsə, `bootstrap` istifadə et:
|
|
408
|
+
|
|
409
|
+
```powershell
|
|
410
|
+
npx packet-tracer-skill --bootstrap
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Bu komanda:
|
|
414
|
+
|
|
415
|
+
- skill-i seçilmiş host yoluna quraşdırır
|
|
416
|
+
- quraşdırılmış skill qovluğunda lokal `.venv` yaradır
|
|
417
|
+
- repository-də elan edilmiş Python tələblərini quraşdırır
|
|
418
|
+
|
|
419
|
+
Amma Cisco Packet Tracer-in özünü quraşdırmır.
|
|
420
|
+
|
|
421
|
+
Tez-tez lazım olan digər variantlar:
|
|
422
|
+
|
|
423
|
+
```powershell
|
|
424
|
+
npx packet-tracer-skill --path <claude-desktop-skills-dir>
|
|
425
|
+
npx packet-tracer-skill --cursor
|
|
426
|
+
npx packet-tracer-skill --claude
|
|
427
|
+
npx packet-tracer-skill --kiro
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Əgər PowerShell `npx.ps1` faylını bloklayırsa:
|
|
431
|
+
|
|
432
|
+
```powershell
|
|
433
|
+
cmd /c npx packet-tracer-skill --cursor
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
Əgər repo üzərində lokal development qurmaq istəyirsənsə:
|
|
437
|
+
|
|
438
|
+
```powershell
|
|
439
|
+
git clone https://github.com/20hajiyev/packet-tracer-skill.git
|
|
440
|
+
cd .\packet-tracer-skill
|
|
441
|
+
powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1 -Dev
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Quraşdırmanı yoxlama
|
|
445
|
+
|
|
446
|
+
Skill-in gözlənilən host yoluna yazıldığını yoxlamaq üçün:
|
|
447
|
+
|
|
448
|
+
```powershell
|
|
449
|
+
npx packet-tracer-skill --verify
|
|
450
|
+
npx packet-tracer-skill --verify --cursor
|
|
451
|
+
npx packet-tracer-skill --verify --path .agents/skills
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Əgər lokal clone ilə işləyirsənsə:
|
|
455
|
+
|
|
456
|
+
```powershell
|
|
457
|
+
node .\bin\packet-tracer-skill.js --verify
|
|
458
|
+
python .\scripts\install_skill.py --host codex --force
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Runtime tələblərini yoxlama
|
|
462
|
+
|
|
463
|
+
Repository-nin quraşdırılması ilə runtime hazırlığı eyni şey deyil.
|
|
464
|
+
|
|
465
|
+
- `install` skill fayllarını kopyalayır
|
|
466
|
+
- `doctor` real `.pkt` generasiya üçün sistem tələblərini yoxlayır
|
|
467
|
+
|
|
468
|
+
İşlət:
|
|
469
|
+
|
|
470
|
+
```powershell
|
|
471
|
+
npx packet-tracer-skill --doctor
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
Yoxladığı şeylər:
|
|
475
|
+
|
|
476
|
+
- `node`
|
|
477
|
+
- `python`
|
|
478
|
+
- `python_version`
|
|
479
|
+
- `python_support_status`
|
|
480
|
+
- `PACKET_TRACER_ROOT`
|
|
481
|
+
- `PACKET_TRACER_TARGET_VERSION`
|
|
482
|
+
- `PACKET_TRACER_COMPAT_DONOR`
|
|
483
|
+
- donor faylının target Packet Tracer versiyası ilə uyğun olub-olmaması
|
|
484
|
+
- `resolved_twofish_path`
|
|
485
|
+
- `twofish_load_status`
|
|
486
|
+
- `twofish_sha256`
|
|
487
|
+
|
|
488
|
+
### Runtime konfiqurasiyası
|
|
489
|
+
|
|
490
|
+
Real `.pkt` generate etməzdən əvvəl lokal Packet Tracer mühitini qur:
|
|
491
|
+
|
|
492
|
+
```powershell
|
|
493
|
+
$env:PACKET_TRACER_ROOT='C:\Program Files\Cisco Packet Tracer 9.0.0'
|
|
494
|
+
$env:PACKET_TRACER_COMPAT_DONOR='C:\path\to\your-working-9.0-donor.pkt'
|
|
495
|
+
$env:PKT_TWOFISH_LIBRARY="$env:USERPROFILE\.codex\skills\pkt\scripts\vendor\_twofish.cp314-win_amd64.pyd"
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Əsas environment dəyişənləri:
|
|
499
|
+
|
|
500
|
+
- `PACKET_TRACER_ROOT`
|
|
501
|
+
- `PACKET_TRACER_SAVES_ROOT`
|
|
502
|
+
- `PACKET_TRACER_EXE`
|
|
503
|
+
- `PACKET_TRACER_COMPAT_DONOR`
|
|
504
|
+
- `PACKET_TRACER_TARGET_VERSION`
|
|
505
|
+
- `PKT_TWOFISH_LIBRARY`
|
|
506
|
+
|
|
507
|
+
Donor siyasəti:
|
|
508
|
+
|
|
509
|
+
- `PACKET_TRACER_COMPAT_DONOR` explicit override kimi qalır
|
|
510
|
+
- o verilməyibsə, repo lokal yayğın qovluqlarda uyğun Packet Tracer 9.0 donorunu avtomatik axtarmağa çalışır
|
|
511
|
+
- o verilibsə və səhvdirsə, repo səssizcə başqa donora keçmir
|
|
512
|
+
|
|
513
|
+
Məcburi qayda:
|
|
514
|
+
|
|
515
|
+
- `PACKET_TRACER_TARGET_VERSION` dəyərini `9.0.0.0810` saxla
|
|
516
|
+
- onu `5.3.0.0011`-ə dəyişmə
|
|
517
|
+
- strict 9.0 generate axınını keçmək üçün köhnə `5.3` donor və ya template fallback istifadə etmə
|
|
518
|
+
- donor yoxdursa və ya versiyası uyğun deyilsə, axını aşağı versiyaya salma; əvvəl donor problemini düzəlt
|
|
519
|
+
|
|
520
|
+
Host qeydi:
|
|
521
|
+
|
|
522
|
+
- host prosesi eyni `PACKET_TRACER_*` və `PKT_TWOFISH_LIBRARY` environment dəyişənlərini görməlidir
|
|
523
|
+
- bu qayda bütün host-lara aiddir: Codex, Cursor, Claude Code, Claude Desktop, Antigravity, Gemini CLI, Kiro və oxşar alətlər
|
|
524
|
+
- əgər host wrapper child-process yoxlamasını bloklayırsa, donorun özünü birbaşa yoxlamaq üçün lokal clone daxilində `python .\scripts\donor_diagnostics.py` işlət
|
|
525
|
+
|
|
526
|
+
Twofish binary-ni hara qoymaq olar:
|
|
527
|
+
|
|
528
|
+
- tövsiyə olunan yol: `_twofish.cp314-win_amd64.pyd` faylını quraşdırılmış skill qovluğundakı `scripts/vendor/twofish.py` faylının yanına qoy
|
|
529
|
+
- override yolu: `PKT_TWOFISH_LIBRARY` dəyişəni ilə həmin lokal binary-nin dəqiq yolunu göstər
|
|
530
|
+
- `C:\tools\pkt-twofish\...` kimi placeholder path yalnız həmin fayl doğrudan da orada olduqda işləyəcək
|
|
531
|
+
|
|
532
|
+
### Bu repo nə edir
|
|
533
|
+
|
|
534
|
+
- Azərbaycan dili + İngilis dili qarışıq prompt-ları parse edir
|
|
535
|
+
- açıq `IntentPlan`, `TopologyPlan` və `ConfigPlan` qurur
|
|
536
|
+
- Cisco lokal donorlarını capability və topology uyğunluğuna görə sıralayır
|
|
537
|
+
- Packet Tracer 9.x uyğunluğu üçün donor-prune adaptasiyası istifadə edir
|
|
538
|
+
- mövcud `.pkt` lab-ları edit edir
|
|
539
|
+
- VLAN, router-on-a-stick, DHCP, DNS, Telnet, ACL, wireless/AP-client və department/campus layout-larını dəstəkləyir
|
|
540
|
+
- generate-dən əvvəl planı `--explain-plan` ilə göstərir
|
|
541
|
+
|
|
542
|
+
### Explain-plan çıxışı
|
|
543
|
+
|
|
544
|
+
`--explain-plan` aşağıdakı blokları qaytarır:
|
|
545
|
+
|
|
546
|
+
- `intent_plan`
|
|
547
|
+
- `topology_plan`
|
|
548
|
+
- `config_plan`
|
|
549
|
+
- `estimate_plan`
|
|
550
|
+
- `preflight_validation`
|
|
551
|
+
- `autofix_summary`
|
|
552
|
+
- `validation_report`
|
|
553
|
+
- `cisco_sample_candidates`
|
|
554
|
+
- `external_reference_patterns`
|
|
555
|
+
- `assumptions_used`
|
|
556
|
+
|
|
557
|
+
Bu, prompt keyfiyyətini debug etmək üçün əsas çıxışdır.
|
|
558
|
+
|
|
559
|
+
### Xarici reference workflow
|
|
560
|
+
|
|
561
|
+
Xarici `.pkt` kolleksiyaları əvvəlcə lokal qovluqda olmalıdır. Tool internetdən
|
|
562
|
+
scrape etmir və GitHub URL-lərini birbaşa donor kimi istifadə etmir.
|
|
563
|
+
|
|
564
|
+
Workflow:
|
|
565
|
+
|
|
566
|
+
1. xarici repo-nu lokalda klonla və ya kopyala
|
|
567
|
+
2. həmin qovluğu `--reference-root` ilə ver
|
|
568
|
+
3. `--explain-plan` nəticəsində `external_reference_patterns`-ə bax
|
|
569
|
+
|
|
570
|
+
Nümunə:
|
|
571
|
+
|
|
572
|
+
```powershell
|
|
573
|
+
python .\scripts\generate_pkt.py --explain-plan "6 şöbəli şəbəkə qur, hər şöbədə 1 switch 1 AP 1 printer 2 PC 2 tablet olsun" --reference-root C:\labs\external-pkt-samples
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
### Tez-tez istifadə olunan komandalar
|
|
577
|
+
|
|
578
|
+
Cisco sample catalog qurmaq:
|
|
579
|
+
|
|
580
|
+
```powershell
|
|
581
|
+
python .\scripts\build_sample_catalog.py
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
Sadə prompt üçün explain-plan:
|
|
585
|
+
|
|
586
|
+
```powershell
|
|
587
|
+
python .\scripts\generate_pkt.py --explain-plan "3 dene switch ve 6 komputer"
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
Campus prompt üçün donor-prune explain-plan:
|
|
591
|
+
|
|
592
|
+
```powershell
|
|
593
|
+
python .\scripts\generate_pkt.py --explain-plan "6 şöbəli şəbəkə qur, hər şöbədə 1 switch, 1 AP, 1 printer, 2 PC, 2 tablet olsun, router-on-a-stick olsun, DHCP routerdən verilsin, management VLAN və telnet olsun"
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
`.pkt` yaratmaq:
|
|
597
|
+
|
|
598
|
+
```powershell
|
|
599
|
+
python .\scripts\generate_pkt.py --prompt "6 şöbəli şəbəkə qur, hər şöbədə 1 switch, 1 AP, 1 printer, 2 PC, 2 tablet olsun, router-on-a-stick olsun, DHCP routerdən verilsin, management VLAN və telnet olsun" --output .\output\campus.pkt --xml-out .\output\campus.xml
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
Mövcud `.pkt` haqqında inventory çıxarmaq:
|
|
603
|
+
|
|
604
|
+
```powershell
|
|
605
|
+
python .\scripts\generate_pkt.py --inventory .\input\lab.pkt
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
`.pkt` decode etmək:
|
|
609
|
+
|
|
610
|
+
```powershell
|
|
611
|
+
python .\scripts\generate_pkt.py --decode .\output\campus.pkt --xml-out .\output\campus.xml
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### Tələblər
|
|
615
|
+
|
|
616
|
+
- Windows
|
|
617
|
+
- lokalda quraşdırılmış Cisco Packet Tracer 9.x
|
|
618
|
+
- lokal Cisco Packet Tracer sample save-ləri
|
|
619
|
+
- lokal Packet Tracer 9.x donor labı
|
|
620
|
+
- Python runtime ilə uyğun lokal Twofish bridge
|
|
621
|
+
|
|
622
|
+
Python setup:
|
|
623
|
+
|
|
624
|
+
```powershell
|
|
625
|
+
powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1 -Dev
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
### Twofish bridge
|
|
629
|
+
|
|
630
|
+
Bu public repo default olaraq prebuilt Twofish binary ilə gəlmir.
|
|
631
|
+
|
|
632
|
+
Bu qəsdəndir:
|
|
633
|
+
|
|
634
|
+
- machine-specific binary paylaşılmır
|
|
635
|
+
- unsigned lokal artefakt təsadüfən publish olunmur
|
|
636
|
+
- private path və build izi paylaşılmır
|
|
637
|
+
|
|
638
|
+
Lokal setup üçün `scripts/vendor/README.md` faylına bax.
|
|
639
|
+
|
|
640
|
+
### Tez-tez rast gəlinən xətalar
|
|
641
|
+
|
|
642
|
+
- `PACKET_TRACER_COMPAT_DONOR set but missing`
|
|
643
|
+
- donor üçün verilmiş yol mövcud deyil
|
|
644
|
+
- ya yolu düzəlt, ya da dəyişəni sil ki, repo donor auto-detect etsin
|
|
645
|
+
- `PACKET_TRACER_COMPAT_DONOR_VERSION version_mismatch`
|
|
646
|
+
- donor faylı var, amma `9.0.0.0810` deyil
|
|
647
|
+
- problemi `5.3.0.0011`-ə düşməklə həll etmə
|
|
648
|
+
- `TWOFISH_LOAD_STATUS missing`
|
|
649
|
+
- lokal bridge tapılmadı
|
|
650
|
+
- `_twofish.cp314-win_amd64.pyd` faylını `scripts/vendor/twofish.py` yanına qoy və ya `PKT_TWOFISH_LIBRARY` göstər
|
|
651
|
+
- `PYTHON_SUPPORT_STATUS unsupported`
|
|
652
|
+
- runtime Python `3.14.x` deyil
|
|
653
|
+
- Python 3.14 qur və `--doctor` yoxlamasını yenidən işlə
|
|
654
|
+
|
|
655
|
+
### Screenshot
|
|
656
|
+
|
|
657
|
+
Cisco Packet Tracer-də açılmış generated campus topology:
|
|
658
|
+
|
|
659
|
+

|
|
660
|
+
|
|
661
|
+
### Təhlükəsizlik və məxfilik
|
|
662
|
+
|
|
663
|
+
Repo lokal private məlumatların təsadüfən paylaşılmaması üçün hazırlanıb:
|
|
664
|
+
|
|
665
|
+
- hardcoded donor path commit olunmur
|
|
666
|
+
- `C:\Users\<name>\...` donor path config-ə yazılmır
|
|
667
|
+
- generated `.pkt` və `.xml` faylları gitignore-dadır
|
|
668
|
+
- Python cache faylları gitignore-dadır
|
|
669
|
+
- Twofish bridge binary-ləri gitignore-dadır
|
|
670
|
+
|
|
671
|
+
Public paylaşmazdan əvvəl bunları yoxla:
|
|
672
|
+
|
|
673
|
+
- `PACKET_TRACER_COMPAT_DONOR` yalnız sənin lokal env-ində olsun
|
|
674
|
+
- paylaşmaq istəmədiyin generated lab-ları commit etmə
|
|
675
|
+
- build etdiyin bridge binary-ni audit etməmisənsə commit etmə
|
|
676
|
+
|
|
677
|
+
### Cari limitlər
|
|
678
|
+
|
|
679
|
+
- yalnız Packet Tracer 9.x
|
|
680
|
+
- Windows-first workflow
|
|
681
|
+
- donor-prune generate donor capacity ilə məhduddur
|
|
682
|
+
- xarici lab-lar donor kimi istifadə olunmur
|
|
683
|
+
- bundled template coverage qəsdən limitlidir
|
|
684
|
+
|
|
685
|
+
### Lisenziya
|
|
686
|
+
|
|
687
|
+
Bu layihə MIT License ilə paylaşılır.
|