sickn33/antigravity-awesome-skills/azure-storage-file-share-py

Claude Code and agent skill by sickn33/antigravity-awesome-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Azure Storage File Share SDK for Python. Use for SMB file shares, directories, and file operations in the cloud.

Install

npx vskill@latest install sickn33/antigravity-awesome-skills/azure-storage-file-share-py

SKILL.md

Azure Storage File Share SDK for Python

Manage SMB file shares for cloud-native and lift-and-shift scenarios.

Installation

bash
pip install azure-storage-file-share

Environment Variables

dotenv
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...
# Or
AZURE_STORAGE_ACCOUNT_URL=https://<account>.file.core.windows.net

Authentication

Connection String
python
import os
from azure.storage.fileshare import ShareServiceClient
service = ShareServiceClient.from_connection_string(
os.environ["AZURE_STORAGE_CONNECTION_STRING"]
)
Entra ID
python
from azure.storage.fileshare import ShareServiceClient
from azure.identity import DefaultAzureCredential
service = ShareServiceClient(
account_url=os.environ["AZURE_STORAGE_ACCOUNT_URL"],
credential=DefaultAzureCredential(),
token_intent="backup",
)

For OAuth, review token_intent and backup permissions; backup intent can bypass file/directory ACL checks and needs an explicitly authorized role. Examples are independent fragments requiring account_url, os and compatible packages. Writes/uploads can replace content; confirm exact share/path, protect existing files, limit download bytes and delete only disposable resources. Never print connection strings or SAS URLs. Copy start is asynchronous: poll destination copy status before reporting success. Use try/finally or async context managers to close clients/credentials on failure.

Share Operations

Create Share
python
share = service.create_share("my-share")
List Shares
python
for share in service.list_shares():
print(f"{share.name}: {share.quota} GB")
Get Share Client
python
share_client = service.get_share_client("my-share")
Delete Share
python
service.delete_share("my-share")

Directory Operations

Create Directory
python
share_client = service.get_share_client("my-share")
share_client.create_directory("my-directory")
# Nested directory
share_client.create_directory("my-directory/sub-directory")
List Directories and Files
python
directory_client = share_client.get_directory_client("my-directory")
for item in directory_client.list_directories_and_files():
if item["is_directory"]:
print(f"[DIR] {item['name']}")
else:
print(f"[FILE] {item['name']} ({item['size']} bytes)")
Delete Directory
python
share_client.delete_directory("my-directory")

File Operations

Upload File
python
file_client = share_client.get_file_client("my-directory/file.txt")
# From string
file_client.upload_file("Hello, World!")
# From file
with open("local-file.txt", "rb") as f:
file_client.upload_file(f)
# From bytes
file_client.upload_file(b"Binary content")
Download File
python
file_client = share_client.get_file_client("my-directory/file.txt")
# To bytes
data = file_client.download_file().readall()
# To file
with open("downloaded.txt", "wb") as f:
data = file_client.download_file()
data.readinto(f)
# Stream chunks
download = file_client.download_file()
for chunk in download.chunks():
process(chunk)
Get File Properties
python
properties = file_client.get_file_properties()
print(f"Size: {properties.size}")
print(f"Content type: {properties.content_settings.content_type}")
print(f"Last modified: {properties.last_modified}")
Delete File
python
file_client.delete_file()
Copy File
python
source_url = "https://account.file.core.windows.net/share/source.txt"
dest_client = share_client.get_file_client("destination.txt")
dest_client.start_copy_from_url(source_url)

Range Operations

Upload Range
python
# Upload to specific range
file_client.upload_range(data=b"content", offset=0, length=7)
Download Range
python
# Download specific range
download = file_client.download_file(offset=0, length=100)
data = download.readall()

Snapshot Operations

Create Snapshot
python
snapshot = share_client.create_snapshot()
print(f"Snapshot: {snapshot['snapshot']}")
Access Snapshot
python
snapshot_client = service.get_share_client(
"my-share",
snapshot=snapshot["snapshot"]
)

Async Client

python
from azure.storage.fileshare.aio import ShareServiceClient
from azure.identity.aio import DefaultAzureCredential
async def upload_file():
credential = DefaultAzureCredential()
service = ShareServiceClient(account_url, credential=credential, token_intent="backup")
share = service.get_share_client("my-share")
file_client = share.get_file_client("test.txt")
await file_client.upload_file("Hello!")
await service.close()
await credential.close()

Client Types

ClientPurpose
ShareServiceClientAccount-level operations
ShareClientShare operations
ShareDirectoryClientDirectory operations
ShareFileClientFile operations

Best Practices

  1. Prefer scoped identity where supported; connection strings contain account credentials
  2. Use Entra ID for production with RBAC
  3. Stream large files using chunks() to avoid memory issues
  4. Create snapshots before major changes
  5. Set quotas to prevent unexpected storage costs
  6. Use ranges for partial file updates
  7. Close async clients explicitly

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
26,857
Repository forks
4,558
Repository npm downloads, 7 days
5,562
7-day trend score
72

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 23 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sickn33/antigravity-awesome-skills/azure-storage-file-share-py/badge)](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/azure-storage-file-share-py)

Something wrong with this skill or its page? Tell us.