get-available-resources
यह क्या करती है
यह टूल आपके कंप्यूटर के उन संसाधनों (जैसे CPU, मेमोरी और डिस्क) की जाँच करता है जो किसी खास प्रोग्राम को मिल सकते हैं। यह योजना बनाने में मदद के लिए इन संसाधनों का एक सुरक्षित और सरल सारांश बनाता है।
कब इस्तेमाल करें
- ✓जब आपको ऐसे प्रोग्राम की योजना बनानी हो जो बहुत संसाधन इस्तेमाल करता है।
- ✓किसी ऐसे काम को चलाने से पहले जो ज़्यादा मेमोरी या प्रोसेसिंग पावर ले सकता है।
- ✓कंप्यूटिंग माहौल की संसाधन सीमाओं को समझने के लिए।
Skill का लिंक
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/get-available-resources/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे काम की योजना बनाने के लिए उपलब्ध संसाधनों की जाँच करो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल प्रोग्राम के मौजूदा माहौल का विश्लेषण करता है और CPU, मेमोरी, डिस्क और दूसरे संसाधनों की सीमाएँ जाँचता है। यह एक डेटा रिपोर्ट (JSON) बनाता है जिसमें दिखाया जाता है कि क्या उपलब्ध है, और इसके लिए सीमाओं को परखने वाला कोई टेस्ट नहीं चलाया जाता।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Get Available Resources
Build a conservative picture of resources available to the current process. Keep host inventory, process affinity, cgroup/container limits, scheduler allocation, and accelerator runtime usability separate.
Safety contract
Follow these rules:
- Run detection when the user requests it or a specific workload needs resource planning. Do not persist a fingerprint for every scientific task.
- Use stdout by default. Persist only when the user chooses an explicit generic local filename.
- Do not run stress tests, benchmarks, large allocations, write probes, device resets, driver installation, or clock/power changes.
- Do not dump the environment. Read only the named Slurm and accelerator variables implemented by the detector.
- Do not report hostnames, absolute paths, cgroup paths, job IDs, device UUIDs, PCI addresses, or raw visibility-variable values.
- Treat a missing observation as unknown. Never convert unknown to unlimited.
- Never infer that a visible host CPU, memory pool, or GPU is usable inside a scheduler allocation or container.
The bundled detector uses only fixed executable/argument tuples, no shell, short timeouts, bounded stdout/stderr, and partial-failure warnings.
Quick start
Run from this skill directory.
Ephemeral stdout snapshot
python scripts/detect_resources.py
The command emits only JSON to stdout. Redirect it only when ordinary shell permissions are acceptable.
Explicit private file
python scripts/detect_resources.py --output resource-snapshot.json
Explicit output is restricted to one .json filename in the current
directory, uses mode 0600 on POSIX, rejects symlinks and path traversal, and
refuses overwrite unless --force is supplied. Forced output also rejects
hard links and non-regular files. Windows privacy additionally depends on the
directory ACL.
Optional psutil enhancement
The standard-library detector works without installation. For broader cross-platform physical-core, affinity, available-memory, swap, and disk coverage:
uv run --no-project --with "psutil==7.2.2" python scripts/detect_resources.py
The import is lazy. Failure to import psutil becomes a warning, not a fatal error.
Skip management-tool probes
python scripts/detect_resources.py --skip-accelerators
Use this when accelerator discovery latency is undesirable. The detector still summarizes the presence and state of allowlisted visibility variables without returning their values.
Required interpretation
CPU
Read these as different facts:
cpu.host.logical: system-visible scheduling units.cpu.host.physical: physical topology, or null; never inferred from logical count.cpu.process.affinity_logical: current affinity-set size when supported.cpu.cgroup_v2.cpuset_logical: effective cgroup cpuset size.cpu.cgroup_v2.quota_cores: finitecpu.maxcapacity, possibly fractional.scheduler.allocation.cpu_per_process: bounded Slurm per-task interpretation when scope is clear.cpu.effective.capacity_cores: minimum positive observed constraint.cpu.effective.worker_ceiling: conservative floor for CPU process workers.
A quota of 1.5 is CPU-time capacity, not 1.5 physical cores. Affinity and cpusets constrain placement; quota constrains bandwidth.
Memory
Keep these separate:
- host total/available memory;
- current cgroup usage, hard
memory.max, and remaining hierarchical capacity; memory.high, which is a pressure/throttle boundary rather than a hard cap;- scheduler memory allocation and its scope; and
- conservative effective hard limit and available estimate.
On Apple silicon, memory.model is unified_cpu_gpu. Do not add integrated GPU
memory to RAM or describe it as separate VRAM.
Accelerators
Each device is a backend candidate:
- NVIDIA GPU → CUDA candidate;
- AMD GPU → ROCm candidate;
- Apple integrated GPU → Metal candidate.
Management-query visibility does not establish:
- scheduler/container permission;
- device-node access;
- driver/runtime compatibility;
- framework package compatibility; or
- operator/data-type support.
Therefore runtime_usable_devices remains null and each device says
runtime_compatibility: not_tested. Visibility/allocation counts constrain
the observed management records, not the number of framework devices. MIG and AMD partition enumeration can differ.
…
अक्सर पूछे जाने वाले सवाल
इस संदर्भ में 'संसाधन' का क्या मतलब है?
ये कंप्यूटर के वे हिस्से हैं जिनका इस्तेमाल प्रोग्राम चलाने के लिए होता है, जैसे प्रोसेसिंग पावर (CPU), मेमोरी (RAM) और डिस्क स्पेस।
रिपोर्ट 'सुरक्षित' और 'सरल' क्यों है?
यह संवेदनशील या बहुत विस्तृत जानकारी (जैसे सटीक फ़ाइल नाम या सिस्टम ID) इकट्ठा नहीं करती, और सिर्फ़ संसाधन सीमाओं पर ध्यान देती है, ताकि सिस्टम पर ज़्यादा बोझ न पड़े या उसकी जानकारी उजागर न हो।
संसाधनों की 'योजना' बनाने का क्या मतलब है?
इसका मतलब है उपलब्ध संसाधनों की जानकारी का इस्तेमाल करके तय करना कि कोई काम कुशलता से कैसे चलाया जाए, ताकि वह क्षमता की कमी से फेल न हो या दूसरे प्रोग्रामों में रुकावट न डाले।
जानकारी
लेखक का मूल विवरण
Detects host inventory and effective CPU, memory, disk, scheduler, container, and accelerator limits when a user asks for resource-aware planning or before a clearly resource-sensitive local workload. Produces a redacted JSON snapshot and conservative planning helpers without stress tests or assuming visible host hardware is usable.
लोकप्रियता
- GitHub स्टार
- 51k
- रैंकिंग में स्थान
- #3471
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
13c-metabolic-flux
51kकार्बन-13 आइसोटोप ट्रेसिंग डेटा से मेटाबोलिक फ़्लक्स का अनुमान लगाता है। कोशिका के मेटाबॉलिज़्म और बायोकेमिकल मार्गों का विश्लेषण करने के लिए यह उपयोगी है।
adaptyv
51kAdaptyv API का उपयोग करके प्रोटीन कैरेक्टराइज़ेशन प्रयोग डिज़ाइन करता है। लागत का अनुमान लगाने, सीक्वेंस सबमिट करने और लैब के नतीजों पर नज़र रखने में मदद करता है।
aeon
51kटाइम सीरीज़ डेटा पर मशीन लर्निंग के काम करता है। क्रमबद्ध डेटा में वर्गीकरण, पूर्वानुमान, एनोमली डिटेक्शन और पैटर्न खोजने के लिए यह उपयोगी है।
alphagenome
51kजेनेटिक वेरिएंट्स के पहले से गणना किए गए जीनोमिक प्रभाव देखता है। वेरिएंट का जीनोम पर असर समझने के लिए स्कोर और स्पष्टीकरण देता है।
मिलती-जुलती skills
knowledge-capture
394kयह आपके एजेंट को ज़रूरी फ़ैसले, पसंद और मुख्य तथ्य स्रोत के उल्लेख के साथ Knowledge vault में छोटे नोट्स के रूप में सेव करना सिखाती है।
knowledge-claim-consolidation
394kयह आपके एजेंट को डुप्लिकेट claims मिलाकर, उन्हें सही विषय पेज पर ले जाकर और पुराने claims हटाकर Knowledge vault को व्यवस्थित करने देती है।
knowledge-correct
394kयह आपके एजेंट को आपके कहने पर सेव किए गए Knowledge claim या पेज को सुधारने या वापस लेने देती है, और बदलाव का रिकॉर्ड रखती है।